From 2dff9275f332210dfe220b9b9f094dc94c32244f Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 8 Apr 2016 18:05:12 +0530 Subject: [PATCH] [test] fixed circular dependencies --- erpnext/accounts/party_status.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/party_status.py b/erpnext/accounts/party_status.py index d0f60a5f62..791250cc7e 100644 --- a/erpnext/accounts/party_status.py +++ b/erpnext/accounts/party_status.py @@ -30,7 +30,11 @@ def notify_status(doc, method): if not party_type: return - party = frappe.get_doc(party_type, doc.get(party_type.lower())) + name = doc.get(party_type.lower()) + if not name: + return + + party = frappe.get_doc(party_type, name) config = get_notification_config().get('for_doctype').get(doc.doctype) status = None