FIX: correct user serializer user method for extended serializer (#8590)

A small fix for Basic User Serializers where some downstream serializers do not correctly set user objects. This caused some issues in certain plugins that depend on the user method to return a user.
This commit is contained in:
Jeff Wong
2019-12-19 09:48:01 -08:00
committed by GitHub
parent 91b290c784
commit 036a24cf30
3 changed files with 16 additions and 1 deletions

View File

@@ -20,6 +20,6 @@ class BasicUserSerializer < ApplicationSerializer
end
def user
object[:user] || object
object[:user] || object.try(:user) || object
end
end