mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-04-21 01:02:08 +03:00
Merge pull request #169 from jerinpetergeorge/drf-yasg-issue-with-custom-auth-model
Adjusted `EMAIL_FIELD` and `USERNAME_FIELD` in `UserDetailsSerializer` class
This commit is contained in:
commit
84f4ae260a
|
@ -131,7 +131,7 @@ class UserDetailsSerializer(serializers.ModelSerializer):
|
|||
"""
|
||||
class Meta:
|
||||
model = UserModel
|
||||
fields = ('pk', 'username', 'email', 'first_name', 'last_name')
|
||||
fields = ('pk', UserModel.USERNAME_FIELD, UserModel.EMAIL_FIELD, 'first_name', 'last_name')
|
||||
read_only_fields = ('email', )
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user