do not add fields to sql-query if they are empty

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1645 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
p.tessenow 14 years ago
parent b538129b5e
commit 8ecb9be481
  1. 2
      app/models/cost_query/filter/base.rb

@ -100,7 +100,7 @@ module CostQuery::Filter
arity = operator.method(:modify).arity - 2
values = self.values || []
values = values[0, arity] if values and arity >= 0 and arity != values.size
operator.modify(query, field, *values)
operator.modify(query, field, *values) unless field.empty?
end
end
end

Loading…
Cancel
Save