From 4690053a5592b2a94006395609e7913903e16e16 Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Thu, 19 May 2016 15:13:12 -0300 Subject: [PATCH] should not looks for products with products plugin activated --- plugins/statistics/lib/statistics_block.rb | 1 + 1 file changed, 1 insertion(+), 0 deletions(-) diff --git a/plugins/statistics/lib/statistics_block.rb b/plugins/statistics/lib/statistics_block.rb index 09a7985..62232d3 100644 --- a/plugins/statistics/lib/statistics_block.rb +++ b/plugins/statistics/lib/statistics_block.rb @@ -93,6 +93,7 @@ class StatisticsBlock < Block end def products + return [] unless environment.plugin_enabled?('ProductsPlugin') if owner.kind_of?(Environment) owner.products.where("profiles.enabled = true and profiles.visible = true").count elsif owner.kind_of?(Enterprise) -- libgit2 0.21.2