fix: checking if doc is submittable before queueing
This commit is contained in:
parent
6099e7e76d
commit
eff6c4fc5d
1 changed files with 6 additions and 1 deletions
|
|
@ -19,7 +19,12 @@ def savedocs(doc, action):
|
|||
# action
|
||||
doc.docstatus = {"Save": 0, "Submit": 1, "Update": 1, "Cancel": 2}[action]
|
||||
if doc.docstatus == 1:
|
||||
if action == "Submit" and doc.meta.queue_in_background and not is_scheduler_inactive():
|
||||
if (
|
||||
action == "Submit"
|
||||
and doc.meta.queue_in_background
|
||||
and doc.meta.is_submittable
|
||||
and not is_scheduler_inactive()
|
||||
):
|
||||
queue_submission(doc, action)
|
||||
return
|
||||
doc.submit()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue