[hotfix] fixes for TypeError: 'NoneType' object is not iterable (#10484)

diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py
index 9e96332..7324532 100644
--- a/erpnext/accounts/doctype/tax_rule/tax_rule.py
+++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py
@@ -163,6 +163,8 @@
 	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