From e74f4eb7ff20eb048d6fe07a8fda9749f507087a Mon Sep 17 00:00:00 2001 From: SayatP <43889425+SayatP@users.noreply.github.com> Date: Thu, 19 Aug 2021 06:45:14 +0400 Subject: [PATCH] More readable conditional statements (#441) --- rest_framework_simplejwt/authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework_simplejwt/authentication.py b/rest_framework_simplejwt/authentication.py index 7916e724a..32899ddd0 100644 --- a/rest_framework_simplejwt/authentication.py +++ b/rest_framework_simplejwt/authentication.py @@ -144,4 +144,4 @@ def default_user_authentication_rule(user): # `AllowAllUsersModelBackend`. However, we explicitly prevent inactive # users from authenticating to enforce a reasonable policy and provide # sensible backwards compatibility with older Django versions. - return True if user is not None and user.is_active else False + return user is not None and user.is_active