From f643edeed555f4fcf7b56ffbf454f846b4912605 Mon Sep 17 00:00:00 2001 From: Tochukwu Date: Sat, 18 Mar 2023 10:11:43 +0100 Subject: [PATCH] Update schema.py --- ninja_jwt/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ninja_jwt/schema.py b/ninja_jwt/schema.py index 75d7c8293..692f83c9b 100644 --- a/ninja_jwt/schema.py +++ b/ninja_jwt/schema.py @@ -73,7 +73,7 @@ def validate_values(cls, values: Dict) -> dict: _user = authenticate(**values) cls._user = _user - if _user is not None and _user.is_active: + if not (_user is not None and _user.is_active): raise exceptions.AuthenticationFailed( cls._default_error_messages["no_active_account"] )