Fix #5313: Exception in -duration:>0.

This commit is contained in:
evazion
2022-11-02 00:03:31 -05:00
parent 0317ced63a
commit 3ecc389995
2 changed files with 10 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ module Searchable
def negate_relation
relation = unscoped
relation = relation.from(all.from_clause.value) if all.from_clause.value.present?
relation = relation.joins(all.joins_values) if all.joins_values.present?
relation.where(all.where_clause.invert.ast)
end