[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:
Fabio Manganiello 2024-09-06 11:55:03 +02:00
parent f18d0d8b74
commit 05b1fcd43a
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -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, {})