From 7f17759a525a7cb63f180c3052833255b03f457e Mon Sep 17 00:00:00 2001 From: Kozin Date: Thu, 16 Nov 2023 18:59:49 +0300 Subject: [PATCH] Fixed the structure of errors when creating a token --- backend/users/auth/serializers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/users/auth/serializers.py b/backend/users/auth/serializers.py index 8877c82..bafdff9 100644 --- a/backend/users/auth/serializers.py +++ b/backend/users/auth/serializers.py @@ -26,7 +26,7 @@ def validate(self, attrs): { class_name: { settings.LOGIN_FIELD: - self.default_error_messages.get('missing_account') + [self.default_error_messages.get('missing_account')] } }, ) @@ -35,7 +35,7 @@ def validate(self, attrs): { class_name: { 'password': - self.default_error_messages.get('wrong_password') + [self.default_error_messages.get('wrong_password')] } }, ) @@ -48,7 +48,7 @@ def validate(self, attrs): { class_name: { 'not_active': - self.default_error_messages.get('inactive_account') + [self.default_error_messages.get('inactive_account')] } }, )