Skip to content

Commit

Permalink
fix admin login failure for django upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Sep 15, 2022
1 parent 5f7fd3b commit b57c74e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/base/authentication/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# https://docs.djangoproject.com/en/1.8/topics/auth/customizing/
class ODMBackend(ModelBackend):

def authenticate(self, username=None, password=None):
return get_user(email=username, password=password) or None
def authenticate(self, request, username=None, password=None, email=None):
return get_user(email=email or username, password=password) or None

def get_user(self, user_id):
try:
Expand Down

0 comments on commit b57c74e

Please sign in to comment.