Commit d4e1a3461e11496d2519d6f0d970972d5ab72dc8
1 parent
d5b179a1
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
dspace_plugin : fix content_types return if context is not cms controller
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
plugins/dspace/lib/dspace_plugin.rb
| @@ -9,6 +9,7 @@ class DspacePlugin < Noosfero::Plugin | @@ -9,6 +9,7 @@ class DspacePlugin < Noosfero::Plugin | ||
| 9 | end | 9 | end |
| 10 | 10 | ||
| 11 | def content_types | 11 | def content_types |
| 12 | + return [] if !context.kind_of?(CmsController) | ||
| 12 | if context.respond_to?(:params) && context.params | 13 | if context.respond_to?(:params) && context.params |
| 13 | types = [] | 14 | types = [] |
| 14 | parent_id = context.params[:parent_id] | 15 | parent_id = context.params[:parent_id] |