mirror of https://github.com/jumpserver/jumpserver
fix: 有默认值 required 为false
parent
89492410aa
commit
ee3cdcd9e4
|
@ -55,13 +55,8 @@ class BasePlaybookManager:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
data = self.params.get(method_id)
|
data = self.params.get(method_id)
|
||||||
default_data = serializer().data
|
|
||||||
if not data:
|
if not data:
|
||||||
data = automation_params.get(method_id, default_data)
|
data = automation_params.get(method_id, {})
|
||||||
|
|
||||||
for k, v in default_data.items():
|
|
||||||
data.setdefault(k, v)
|
|
||||||
|
|
||||||
params = serializer(data).data
|
params = serializer(data).data
|
||||||
return {
|
return {
|
||||||
field_name: automation_params.get(field_name, '')
|
field_name: automation_params.get(field_name, '')
|
||||||
|
|
Loading…
Reference in New Issue