From 11224eaf06b14d32d83170185eaf818cccc8f1c9 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Tue, 22 Aug 2017 12:03:02 +0530 Subject: [PATCH] [hotfix] fixes for TypeError: 'NoneType' object is not iterable (#10484) --- erpnext/accounts/doctype/tax_rule/tax_rule.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py index 9e963328b54..7324532a397 100644 --- a/erpnext/accounts/doctype/tax_rule/tax_rule.py +++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py @@ -163,6 +163,8 @@ def get_tax_template(posting_date, args): return tax_template def get_customer_group_condition(customer_group): - customer_groups = ["'%s'"%(d.name) for d in get_parent_customer_groups(frappe.db.escape(customer_group))] - condition = ",".join(['%s'] * len(customer_groups))%(tuple(customer_groups)) + condition = "" + customer_groups = ["'%s'"%(frappe.db.escape(d.name)) for d in get_parent_customer_groups(customer_group)] + if customer_groups: + condition = ",".join(['%s'] * len(customer_groups))%(tuple(customer_groups)) return condition \ No newline at end of file