Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `README.md`: Minor upstream change, our README is completely different. Kept ours. - `lib/tasks/assets.rake`: glitch-soc has extra code to deal with its theming system, upstream changed a line that exists in glitch-soc. Applied upstream changes.
This commit is contained in:
@@ -129,10 +129,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
|
||||
|
||||
|
Reference in New Issue
Block a user