From bf3056abc406536f58e466b83c5fce5432cc93c4 Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 20 Nov 2020 15:23:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(django3):=20=E4=BF=AE=E5=A4=8Ddjango3?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/validators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/common/validators.py b/apps/common/validators.py index d9b5f74a4..0ce334552 100644 --- a/apps/common/validators.py +++ b/apps/common/validators.py @@ -14,9 +14,9 @@ alphanumeric = RegexValidator(r'^[0-9a-zA-Z_@\-\.]*$', _('Special char not allow class ProjectUniqueValidator(UniqueTogetherValidator): - def __call__(self, attrs): + def __call__(self, attrs, serializer): try: - super().__call__(attrs) + super().__call__(attrs, serializer) except ValidationError as e: errors = {} for field in self.fields: