From 49d04f449e06f6a4eb430eab642d1021f21d3af7 Mon Sep 17 00:00:00 2001 From: Khushal Trivedi Date: Thu, 2 Jul 2020 14:51:20 +0530 Subject: [PATCH] fix: no else condition required since we can decalre it by default (#22537) * fix: removing unnecessary else condition on customer form * fix: removing unnecessary else condition on customer form * fix: no else condition required since we can decalre it by default Co-authored-by: Khushal Trivedi --- erpnext/selling/doctype/customer/customer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index d70c64fce4..e5c7c3c1fc 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -342,11 +342,10 @@ def get_loyalty_programs(doc): @frappe.whitelist() def get_customer_list(doctype, txt, searchfield, start, page_len, filters=None): from erpnext.controllers.queries import get_fields + fields = ["name", "customer_name", "customer_group", "territory"] if frappe.db.get_default("cust_master_name") == "Customer Name": fields = ["name", "customer_group", "territory"] - else: - fields = ["name", "customer_name", "customer_group", "territory"] fields = get_fields("Customer", fields) @@ -552,4 +551,4 @@ def get_customer_primary_contact(doctype, txt, searchfield, start, page_len, fil """, { 'customer': customer, 'txt': '%%%s%%' % txt - }) + }) \ No newline at end of file