diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-01-10 13:59:38 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-01-10 13:59:38 +0100 |
commit | 259530d1439951f3fd9ba70469fb0fa2cd0db665 (patch) | |
tree | de677725e22bb65b7fa1db1950bf7331690d77fb | |
parent | 9f0a786894a83c6cc47efc1b107b7c1232b3bc36 (diff) | |
download | sonarqube-259530d1439951f3fd9ba70469fb0fa2cd0db665.tar.gz sonarqube-259530d1439951f3fd9ba70469fb0fa2cd0db665.zip |
filters: fix bug on db migration + do not fail if criterion on disabled metric
-rw-r--r-- | sonar-server/src/main/java/org/sonar/server/filters/Filter.java | 2 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/filters/Filter.java b/sonar-server/src/main/java/org/sonar/server/filters/Filter.java index 9a708a727f6..e50703f6353 100644 --- a/sonar-server/src/main/java/org/sonar/server/filters/Filter.java +++ b/sonar-server/src/main/java/org/sonar/server/filters/Filter.java @@ -360,7 +360,7 @@ public class Filter { public boolean mustReturnEmptyResult() { boolean hasCriterionOnVariation = false; for (MeasureCriterion criterion : measureCriteria) { - if (criterion.isVariation()) { + if (criterion.isVariation()==Boolean.TRUE) { hasCriterionOnVariation = true; } } diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb index 3cf5c83907f..7a80de2ae6b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb @@ -47,7 +47,7 @@ class Filter < ActiveRecord::Base def measure_criteria @measure_criteria ||= begin - criteria.select{|c| c.on_metric?} + criteria.select{|c| c.on_metric? && c.metric} end end |