Return pk in /rest-auth/user/ instead of id

This commit is contained in:
Maxim Kukhtenkov 2016-10-17 10:27:03 -07:00
parent e662736e4a
commit 35fe1ae590

View File

@ -126,7 +126,7 @@ class UserDetailsSerializer(serializers.ModelSerializer):
"""
class Meta:
model = UserModel
fields = ('id', 'username', 'email', 'first_name', 'last_name')
fields = ('pk', 'username', 'email', 'first_name', 'last_name')
read_only_fields = ('email', )