Merge pull request #12885 from netchampfaris/setup-progress-deadlock-fix

[deadlock fix] Save if not set
This commit is contained in:
Prateeksha Singh 2018-02-13 13:16:37 +05:30 committed by GitHub
commit ecc6f86c7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 [