From d53b14982863b31e0667637846840496272a3a99 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 13 Feb 2018 16:31:00 +0530 Subject: [PATCH] [deadlock fix] Save if not set (#12896) --- erpnext/utilities/user_progress.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/utilities/user_progress.py b/erpnext/utilities/user_progress.py index aa93c650e4f..38732138e21 100644 --- a/erpnext/utilities/user_progress.py +++ b/erpnext/utilities/user_progress.py @@ -13,9 +13,9 @@ def get_slide_settings(): doc = frappe.get_doc("Setup Progress") item = [d for d in doc.get("actions") if d.action_name == "Set Sales Target"][0] - item.action_document = company - item.save() - doc.save() + if not item.action_document: + item.action_document = company + doc.save() # Initial state of slides return [