Fix a problem with a change in results from User.has_usable_password

This commit is contained in:
Jeff Bradberry
2019-07-09 15:59:07 -04:00
parent 210517eeb1
commit 1093a662f1
3 changed files with 7 additions and 3 deletions

View File

@@ -179,7 +179,7 @@ def _decorate_enterprise_user(user, provider):
def _get_or_set_enterprise_user(username, password, provider):
created = False
try:
user = User.objects.all().prefetch_related('enterprise_auth').get(username=username)
user = User.objects.prefetch_related('enterprise_auth').get(username=username)
except User.DoesNotExist:
user = User(username=username)
enterprise_auth = _decorate_enterprise_user(user, provider)