diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/serializers/rest/account_serializer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/rest/account_serializer.rb b/app/serializers/rest/account_serializer.rb index 62eac1fbd..f6fad9fe1 100644 --- a/app/serializers/rest/account_serializer.rb +++ b/app/serializers/rest/account_serializer.rb @@ -125,10 +125,10 @@ class REST::AccountSerializer < ActiveModel::Serializer end def roles - if object.suspended? + if object.suspended? || object.user.nil? [] else - [object.user.role].compact.filter { |role| role.highlighted? } + [object.user.role].compact.filter(&:highlighted?) end end |