mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-25 18:43:44 +03:00
Pass context to user defined USER_DETAILS_SERIALIZER
This commit is contained in:
parent
8c58782e30
commit
052094d43c
|
@ -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