Commit 4690053a5592b2a94006395609e7913903e16e16
1 parent
da702534
Exists in
staging
and in
28 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 | 93 | end |
| 94 | 94 | |
| 95 | 95 | def products |
| 96 | + return [] unless environment.plugin_enabled?('ProductsPlugin') | |
| 96 | 97 | if owner.kind_of?(Environment) |
| 97 | 98 | owner.products.where("profiles.enabled = true and profiles.visible = true").count |
| 98 | 99 | elsif owner.kind_of?(Enterprise) | ... | ... |