Carlos Martinez 2019-11-13 17:13:29 -05:00 committed by Cristi Vîjdea
parent a72e5b2899
commit 27007a9cf4
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ class Command(BaseCommand):
if user: if user:
# Only call get_user_model if --user was passed in order to # Only call get_user_model if --user was passed in order to
# avoid crashing if auth is not configured in the project # avoid crashing if auth is not configured in the project
user = get_user_model().objects.get(username=user) user = get_user_model().objects.get(**{get_user_model().USERNAME_FIELD: user})
mock = mock or private or (user is not None) or (api_version is not None) mock = mock or private or (user is not None) or (api_version is not None)
if mock and not api_url: if mock and not api_url: