Commit 45c85fa7b2da2888413c86489328e0b949e2958f
1 parent
44bc3048
Exists in
community_hub_submodule
community_dashboard : fix content_types return if context is not cms controller
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
lib/community_hub_plugin.rb
@@ -13,6 +13,7 @@ class CommunityHubPlugin < Noosfero::Plugin | @@ -13,6 +13,7 @@ class CommunityHubPlugin < Noosfero::Plugin | ||
13 | end | 13 | end |
14 | 14 | ||
15 | def content_types | 15 | def content_types |
16 | + return [] if !context.kind_of?(CmsController) | ||
16 | if context.respond_to?(:params) && context.params | 17 | if context.respond_to?(:params) && context.params |
17 | types = [] | 18 | types = [] |
18 | types << CommunityHubPlugin::Hub if context.profile.community? | 19 | types << CommunityHubPlugin::Hub if context.profile.community? |