mirror of https://github.com/jumpserver/jumpserver
fix: 修复创建数据库时包含账号失败的问题
parent
e324c46f87
commit
4e2c2b652f
|
@ -17,10 +17,11 @@ class AccountSerializerCreateValidateMixin:
|
||||||
replace_attrs: callable
|
replace_attrs: callable
|
||||||
|
|
||||||
def to_internal_value(self, data):
|
def to_internal_value(self, data):
|
||||||
self.id = data.pop('id', None)
|
ret = super().to_internal_value(data)
|
||||||
self.push_now = data.pop('push_now', False)
|
self.id = ret.pop('id', None)
|
||||||
self.template = data.pop('template', False)
|
self.push_now = ret.pop('push_now', False)
|
||||||
return super().to_internal_value(data)
|
self.template = ret.pop('template', False)
|
||||||
|
return ret
|
||||||
|
|
||||||
def set_secret(self, attrs):
|
def set_secret(self, attrs):
|
||||||
_id = self.id
|
_id = self.id
|
||||||
|
|
Loading…
Reference in New Issue