parent
5c824c1ee0
commit
cb627cc7d6
1 changed files with 1 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ def validate_workflow(doc):
|
|||
current_state = doc._doc_before_save.get(workflow.workflow_state_field)
|
||||
next_state = doc.get(workflow.workflow_state_field)
|
||||
|
||||
if not next_state:
|
||||
if not next_state or not current_state:
|
||||
# set default state (maybe not set in insert)
|
||||
current_state = next_state = workflow.states[0].state
|
||||
doc.set(workflow.workflow_state_field, workflow.states[0].state)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue