From 108e935744f346b958eb80f5706fa18990eaac37 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 11 Feb 2015 12:24:45 +0530 Subject: [PATCH] minor fix in authorization rule --- .../doctype/authorization_control/authorization_control.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.py b/erpnext/setup/doctype/authorization_control/authorization_control.py index fbf4b1cb36..b72f059ac7 100644 --- a/erpnext/setup/doctype/authorization_control/authorization_control.py +++ b/erpnext/setup/doctype/authorization_control/authorization_control.py @@ -94,6 +94,9 @@ class AuthorizationControl(TransactionBase): self.validate_auth_rule(doctype_name, auth_value, based_on, add_cond, company) def validate_approving_authority(self, doctype_name,company, total, doc_obj = ''): + if not frappe.db.count("Authorization Rule"): + return + av_dis = 0 if doc_obj: price_list_rate, base_rate = 0, 0