From 78b390eb4700a012130c322c9b35b0e02cf659eb Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 11 Aug 2015 15:10:29 +0530 Subject: [PATCH] [fix] check dynamic links before cancel --- frappe/model/document.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/model/document.py b/frappe/model/document.py index 547bdc6932..7f6149dd40 100644 --- a/frappe/model/document.py +++ b/frappe/model/document.py @@ -578,9 +578,10 @@ class Document(BaseDocument): def check_no_back_links_exist(self): """Check if document links to any active document before Cancel.""" - from frappe.model.delete_doc import check_if_doc_is_linked + from frappe.model.delete_doc import check_if_doc_is_linked, check_if_doc_is_dynamically_linked if not self.flags.ignore_links: check_if_doc_is_linked(self, method="Cancel") + check_if_doc_is_dynamically_linked(self) @staticmethod def whitelist(f):