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 <khushalt5@gmail.com>
This commit is contained in:
Khushal Trivedi 2020-07-02 14:51:20 +05:30 committed by GitHub
parent 25b6c5d55a
commit 49d04f449e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
})
})