workflows: do not crash on incomplete jump condition (#22466)
This commit is contained in:
parent
dff62a8cb7
commit
fe2b701f7d
|
@ -149,7 +149,7 @@ class JumpWorkflowStatusItem(WorkflowStatusJumpItem):
|
|||
if not wf_status:
|
||||
return _('broken')
|
||||
reasons = []
|
||||
if self.condition:
|
||||
if self.condition and self.condition.get('value'):
|
||||
reasons.append(_('condition'))
|
||||
if self.trigger:
|
||||
reasons.append(_('trigger'))
|
||||
|
@ -217,7 +217,7 @@ class JumpWorkflowStatusItem(WorkflowStatusJumpItem):
|
|||
def must_jump(self, formdata):
|
||||
must_jump = True
|
||||
|
||||
if self.condition:
|
||||
if self.condition and self.condition.get('value'):
|
||||
variables = get_publisher().substitutions.get_context_variables()
|
||||
try:
|
||||
must_jump = eval(self.condition['value'], get_publisher().get_global_eval_dict(), variables)
|
||||
|
|
Loading…
Reference in New Issue