fix: 有默认值 required 为false

pull/10921/head
feng 1 year ago committed by Bryan
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…
Cancel
Save