From 93081d423a73a6b16e5adfb94247ffec23ef667c Mon Sep 17 00:00:00 2001 From: John Tordoff <> Date: Thu, 15 Sep 2022 16:03:42 -0400 Subject: [PATCH] Fix admin login failure for django upgrade --- api/base/authentication/backends.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/base/authentication/backends.py b/api/base/authentication/backends.py index 68954988658..b2766b094a7 100644 --- a/api/base/authentication/backends.py +++ b/api/base/authentication/backends.py @@ -2,10 +2,11 @@ from framework.auth.core import get_user from django.contrib.auth.backends import ModelBackend -# https://docs.djangoproject.com/en/1.8/topics/auth/customizing/ + +# https://docs.djangoproject.com/en/3.2/topics/auth/customizing/ class ODMBackend(ModelBackend): - def authenticate(self, username=None, password=None): + def authenticate(self, request, username=None, password=None, **kwargs): return get_user(email=username, password=password) or None def get_user(self, user_id):