mirror of https://github.com/jumpserver/jumpserver
fix(django3): 修复django3兼容问题
parent
f2fd9f5990
commit
bf3056abc4
|
@ -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…
Reference in New Issue