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

Commit

Permalink
get_username_field: catch AttributeError (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
blaklites authored and blueyed committed Sep 15, 2017
1 parent 8d18e08 commit 4d4aa6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework_jwt/compat.py
Expand Up @@ -22,7 +22,7 @@ def __init__(self, *args, **kwargs):
def get_username_field():
try:
username_field = get_user_model().USERNAME_FIELD
except:
except AttributeError:
username_field = 'username'

return username_field
Expand Down

0 comments on commit 4d4aa6e

Please sign in to comment.