mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 09:06:40 +03:00
Merge pull request #327 from blablacio/user-details-serializer-context
Pass context to user defined USER_DETAILS_SERIALIZER
This commit is contained in:
commit
53398f8727
|
@ -146,7 +146,7 @@ class JWTSerializer(serializers.Serializer):
|
||||||
JWTUserDetailsSerializer = import_callable(
|
JWTUserDetailsSerializer = import_callable(
|
||||||
rest_auth_serializers.get('USER_DETAILS_SERIALIZER', UserDetailsSerializer)
|
rest_auth_serializers.get('USER_DETAILS_SERIALIZER', UserDetailsSerializer)
|
||||||
)
|
)
|
||||||
user_data = JWTUserDetailsSerializer(obj['user']).data
|
user_data = JWTUserDetailsSerializer(obj['user'], context=self.context).data
|
||||||
return user_data
|
return user_data
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user