Skip to content

Commit

Permalink
don't show deleted records by default. datacite/datacite#1230
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 16, 2021
1 parent ef20ffb commit 7d07b46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def query(query, options = {})
filter << { terms: { focus_area: options[:focus_area].split(",") } }
end

unless options[:include_deleted]
unless options[:include_deleted].present?
must_not << { exists: { field: "deleted_at" } }
end
must_not << { term: { role_name: "ROLE_ADMIN" } }
Expand Down Expand Up @@ -404,7 +404,7 @@ def query(query, options = {})
if options[:client_type].present?
filter << { term: { client_type: options[:client_type] } }
end
unless options[:include_deleted]
unless options[:include_deleted].present?
must_not << { exists: { field: "deleted_at" } }
end
elsif name == "Event"
Expand Down Expand Up @@ -667,7 +667,7 @@ def query(query, options = {})
if options[:role_name].present?
filter << { term: { role_name: options[:role_name] } }
end
unless options[:include_deleted]
unless options[:include_deleted].present?
must_not << { exists: { field: "deleted_at" } }
end
end
Expand Down

0 comments on commit 7d07b46

Please sign in to comment.