Commit 0a92d3964643a60d463e5b22ffd02b1218c85783
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'api' of https://gitlab.com/participa/noosfero into api
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 | ... | ... |