Skip to content

Commit

Permalink
Django 2.2 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lubos Matl committed Apr 3, 2020
1 parent cfd2c43 commit ece6135
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chamber/multidomains/auth/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ModelBackend(GetUserMixin, OriginModelBackend):
Authenticates against settings.AUTH_USER_MODEL.
"""

def authenticate(self, username=None, password=None, **kwargs):
def authenticate(self, request, username=None, password=None, **kwargs):
UserModel = get_user_class()
if username is None:
username = kwargs.get(UserModel.USERNAME_FIELD)
Expand Down
2 changes: 1 addition & 1 deletion chamber/multidomains/auth/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_token(request):
and settings.MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME):
ovetaker_auth_token = request.COOKIES.get(settings.MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME)
token = get_object_or_none(Token, key=ovetaker_auth_token, is_active=True)
if utils.get_user_from_token(token).is_authenticated():
if utils.get_user_from_token(token).is_authenticated:
return token

return utils.get_token(request)
Expand Down

0 comments on commit ece6135

Please sign in to comment.