Commit 4690053a5592b2a94006395609e7913903e16e16
1 parent
da702534
Exists in
ratings_minor_fixes
and in
3 other branches
should not looks for products with products plugin activated
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
plugins/statistics/lib/statistics_block.rb
@@ -93,6 +93,7 @@ class StatisticsBlock < Block | @@ -93,6 +93,7 @@ class StatisticsBlock < Block | ||
93 | end | 93 | end |
94 | 94 | ||
95 | def products | 95 | def products |
96 | + return [] unless environment.plugin_enabled?('ProductsPlugin') | ||
96 | if owner.kind_of?(Environment) | 97 | if owner.kind_of?(Environment) |
97 | owner.products.where("profiles.enabled = true and profiles.visible = true").count | 98 | owner.products.where("profiles.enabled = true and profiles.visible = true").count |
98 | elsif owner.kind_of?(Enterprise) | 99 | elsif owner.kind_of?(Enterprise) |