Commit 44bc30486a5624ae104a9b28155bfdea190e3ea9

Authored by Victor Costa
1 parent 2ff7be51
Exists in master

community_hub: allow creation of hub with parent

Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
lib/community_hub_plugin.rb
@@ -15,8 +15,7 @@ class CommunityHubPlugin < Noosfero::Plugin @@ -15,8 +15,7 @@ class CommunityHubPlugin < Noosfero::Plugin
15 def content_types 15 def content_types
16 if context.respond_to?(:params) && context.params 16 if context.respond_to?(:params) && context.params
17 types = [] 17 types = []
18 - parent_id = context.params[:parent_id]  
19 - types << CommunityHubPlugin::Hub if context.profile.community? && !parent_id 18 + types << CommunityHubPlugin::Hub if context.profile.community?
20 types 19 types
21 else 20 else
22 [CommunityHubPlugin::Hub] 21 [CommunityHubPlugin::Hub]