Browse Source

fix(django3): 修复django3兼容问题

pull/5053/head
ibuler 4 years ago committed by 老广
parent
commit
bf3056abc4
  1. 4
      apps/common/validators.py

4
apps/common/validators.py

@ -14,9 +14,9 @@ alphanumeric = RegexValidator(r'^[0-9a-zA-Z_@\-\.]*$', _('Special char not allow
class ProjectUniqueValidator(UniqueTogetherValidator): class ProjectUniqueValidator(UniqueTogetherValidator):
def __call__(self, attrs): def __call__(self, attrs, serializer):
try: try:
super().__call__(attrs) super().__call__(attrs, serializer)
except ValidationError as e: except ValidationError as e:
errors = {} errors = {}
for field in self.fields: for field in self.fields:

Loading…
Cancel
Save