]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3822 Error on Active reviews per developer widget
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Fri, 21 Sep 2012 14:43:05 +0000 (16:43 +0200)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Fri, 21 Sep 2012 14:43:05 +0000 (16:43 +0200)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/reviews_per_developer.html.erb

index ae699f45e6c16263367f9066cb924e78a6ef1d36..c232402b39f73378ac43a436aeb429fe84b4ddce 100644 (file)
@@ -26,7 +26,8 @@
           counter_no_assignee += 1
         end
       end
-      counter_max = reviews_by_dev.values.max
+      counter_max = 0
+      counter_max = reviews_by_dev.values.max unless reviews_by_dev.empty?
       counter_max = counter_no_assignee if counter_no_assignee > counter_max
       
       div_id = "review-per-dev-widget-#{widget.id.to_s}"