mirror of https://github.com/jumpserver/jumpserver
perf: 修改协议创建时一些默认值
parent
86dab4fc6e
commit
c602bf7224
|
@ -306,10 +306,11 @@ class AllTypes(ChoicesMixin):
|
|||
protocols_data = deepcopy(default_protocols)
|
||||
if _protocols:
|
||||
protocols_data = [p for p in protocols_data if p['name'] in _protocols]
|
||||
|
||||
for p in protocols_data:
|
||||
setting = _protocols_setting.get(p['name'], {})
|
||||
p['required'] = p.pop('required', False)
|
||||
p['default'] = p.pop('default', False)
|
||||
p['required'] = setting.pop('required', False)
|
||||
p['default'] = setting.pop('default', False)
|
||||
p['setting'] = {**p.get('setting', {}), **setting}
|
||||
|
||||
platform_data = {
|
||||
|
|
Loading…
Reference in New Issue