Commit a9bb3dddb4186ed5ff48fd4b31dc518d9ecf3d16
1 parent
71d7e8fa
Exists in
staging
and in
7 other branches
community_track: fix content_type return if context is not cms controller
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
plugins/community_track/lib/community_track_plugin.rb
| @@ -13,6 +13,7 @@ class CommunityTrackPlugin < Noosfero::Plugin | @@ -13,6 +13,7 @@ class CommunityTrackPlugin < 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 | parent_id = context.params[:parent_id] | 19 | parent_id = context.params[:parent_id] |