From 6adba68fbad9e947865bed749446aa71efa48227 Mon Sep 17 00:00:00 2001
From: "p.tessenow"
Date: Thu, 30 Sep 2010 15:56:19 +0000
Subject: [PATCH] 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
---
app/models/cost_query/operator.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/models/cost_query/operator.rb b/app/models/cost_query/operator.rb
index 6632e44523..ddb1150778 100644
--- a/app/models/cost_query/operator.rb
+++ b/app/models/cost_query/operator.rb
@@ -54,7 +54,8 @@ class CostQuery::Operator
new "!" do
def modify(query, field, *values)
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
end