diff --git a/flashcards/api.py b/flashcards/api.py index 0dd092d..f7b3a04 100644 --- a/flashcards/api.py +++ b/flashcards/api.py @@ -84,7 +84,7 @@ class UserLogin(APIView): password = request.data['password'] user = authenticate(email=email, password=password) - if user is not None: + if user is None: raise ValidationError('Invalid email or password') if not user.is_active: raise ValidationError('Account is disabled')