Commit 14be2fffd09de8d1b8de203579a0ed6595bc0db7

Authored by Francisco Júnior
1 parent a9bb3ddd

work_assignment: fix content_types return if context is not cms controller

plugins/work_assignment/lib/work_assignment_plugin.rb
@@ -18,6 +18,7 @@ class WorkAssignmentPlugin < Noosfero::Plugin @@ -18,6 +18,7 @@ class WorkAssignmentPlugin < Noosfero::Plugin
18 end 18 end
19 19
20 def content_types 20 def content_types
  21 + return [] if !context.kind_of?(CmsController)
21 [WorkAssignmentPlugin::WorkAssignment] if context.respond_to?(:profile) && context.profile.organization? 22 [WorkAssignmentPlugin::WorkAssignment] if context.respond_to?(:profile) && context.profile.organization?
22 end 23 end
23 24