forked from platypush/platypush
[procedures] Don't validate the presence of the actions
field in procedures.save
.
When saving procedures with if/else/for blocks, some blocks aren't supposed to have the `actions` field.
This commit is contained in:
parent
f18d0d8b74
commit
05b1fcd43a
1 changed files with 0 additions and 3 deletions
|
@ -185,9 +185,6 @@ class ProceduresPlugin(RunnablePlugin, ProcedureEntityManager):
|
||||||
"""
|
"""
|
||||||
assert name, 'Procedure name cannot be empty'
|
assert name, 'Procedure name cannot be empty'
|
||||||
assert actions, 'Procedure actions cannot be empty'
|
assert actions, 'Procedure actions cannot be empty'
|
||||||
assert all(
|
|
||||||
isinstance(action, dict) and action.get('action') for action in actions
|
|
||||||
), 'Procedure actions should be dictionaries with an "action" key'
|
|
||||||
|
|
||||||
args = args or []
|
args = args or []
|
||||||
proc_def = self._all_procedures.get(name, {})
|
proc_def = self._all_procedures.get(name, {})
|
||||||
|
|
Loading…
Reference in a new issue