mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-06-20 04:43:03 +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:
|
class Meta:
|
||||||
model = UserModel
|
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', )
|
read_only_fields = ('email', )
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user