Skip to content

Commit

Permalink
Fix #485 (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmart626 authored and axnsan12 committed Nov 13, 2019
1 parent a72e5b2 commit 27007a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drf_yasg/management/commands/generate_swagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def handle(self, output_file, overwrite, format, api_url, mock, api_version, use
if user:
# Only call get_user_model if --user was passed in order to
# 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)
if mock and not api_url:
Expand Down

0 comments on commit 27007a9

Please sign in to comment.