From eff6c4fc5d64b183a8086bb44b6f08afa4a08f01 Mon Sep 17 00:00:00 2001 From: Aradhya Date: Sat, 8 Oct 2022 17:38:12 +0530 Subject: [PATCH] fix: checking if doc is submittable before queueing --- frappe/desk/form/save.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frappe/desk/form/save.py b/frappe/desk/form/save.py index f43031c899..949de9e7aa 100644 --- a/frappe/desk/form/save.py +++ b/frappe/desk/form/save.py @@ -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()