Commit 4932de4325115720e1c0740157bb52823737352c
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'api' into production
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/noosfero/api/entities.rb
... | ... | @@ -114,7 +114,7 @@ module Noosfero |
114 | 114 | expose :permissions do |user, options| |
115 | 115 | output = {} |
116 | 116 | user.person.role_assignments.map do |role_assigment| |
117 | - if role_assigment.resource.respond_to?(:identifier) | |
117 | + if role_assigment.resource.respond_to?(:identifier) && !role_assigment.role.nil? | |
118 | 118 | output[role_assigment.resource.identifier] = role_assigment.role.permissions |
119 | 119 | end |
120 | 120 | end | ... | ... |