Skip to content

Commit

Permalink
add append_where_date_is_set
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Wegria committed Jun 12, 2024
1 parent c73f11f commit 1ad601c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/search/complex_datation_strategy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def search(scope, criteria)

if negate
date_scope = scope.where("#{sql_select_table_name}.data->'#{field.uuid}'->>'selected_format' = 'date_time'")
date_scope = append_where_data_is_set(date_scope)
scope = id_scope.or(date_scope)
else
scope = id_scope.or(search_dates(original_scope, start_date_time, end_date_time, field_condition, negate, true))
Expand All @@ -51,6 +52,7 @@ def search(scope, criteria)

if negate
date_scope = scope.where("#{sql_select_table_name}.data->'#{field.uuid}'->>'selected_format' = 'date_time'")
date_scope = append_where_data_is_set(date_scope)
else
date_scope = search_dates(scope, start_date_time, end_date_time, field_condition, negate, true)
end
Expand Down

0 comments on commit 1ad601c

Please sign in to comment.