Skip to content
This repository was archived by the owner on May 26, 2020. It is now read-only.

Commit 40f4506

Browse files
committed
Merge pull request #9 from spenthil/patch-1
Custom User model compatibility
2 parents 121bf74 + f54efba commit 40f4506

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework_jwt/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def jwt_payload_handler(user):
88
return {
99
'user_id': user.id,
1010
'email': user.email,
11-
'username': user.username,
11+
'username': user.get_username(),
1212
'exp': datetime.datetime.utcnow() + api_settings.JWT_EXPIRATION_DELTA
1313
}
1414

0 commit comments

Comments
 (0)