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