FIX: Properly capture period for /filter emotion ordering (#940)
This commit is contained in:
parent
8e00e036e1
commit
2c78961bed
|
@ -17,8 +17,7 @@ module DiscourseAi
|
|||
end
|
||||
&.expr
|
||||
&.split(">=")
|
||||
&.last if scope.arel.constraints.present? &&
|
||||
scope.arel.constraints.any? { |c| c.is_a?(Arel::Nodes::Grouping) }
|
||||
&.last if scope.to_sql.include?("topics.bumped_at >=")
|
||||
|
||||
# Fallback in case we can't find the scope period
|
||||
scope_period ||= "CURRENT_DATE - INTERVAL '1 year'"
|
||||
|
|
Loading…
Reference in New Issue