Skip to content

Commit

Permalink
chore(account/utils): Don't assume User default manager is objects
Browse files Browse the repository at this point in the history
  • Loading branch information
boyd-bit-io authored Apr 19, 2021
1 parent c52caa9 commit 06560b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions allauth/account/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ def filter_users_by_username(*username):
q = qlist[0]
for q2 in qlist[1:]:
q = q | q2
ret = get_user_model().objects.filter(q)
ret = get_user_model()._default_manager.filter(q)
else:
ret = get_user_model().objects.filter(
ret = get_user_model()._default_manager.filter(
**{
app_settings.USER_MODEL_USERNAME_FIELD
+ "__in": [u.lower() for u in username]
Expand Down

0 comments on commit 06560b5

Please sign in to comment.