fixed bug - '!'-operator wasn't working anymore due to sometimes missing ')'

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1828 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
p.tessenow 14 years ago
parent 028b50ca0e
commit ca326d8f0f
  1. 3
      app/models/cost_query/operator.rb

@ -54,7 +54,8 @@ class CostQuery::Operator
new "!" do new "!" do
def modify(query, field, *values) def modify(query, field, *values)
where_clause = "(#{field} IS NULL" where_clause = "(#{field} IS NULL"
where_clause += " OR #{field} NOT IN #{collection(*values)})" unless values.empty? where_clause += " OR #{field} NOT IN #{collection(*values)}" unless values.empty?
where_clause += ")"
query.where where_clause query.where where_clause
query query
end end

Loading…
Cancel
Save