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:
parent
25b6c5d55a
commit
49d04f449e
@ -342,11 +342,10 @@ def get_loyalty_programs(doc):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_customer_list(doctype, txt, searchfield, start, page_len, filters=None):
|
def get_customer_list(doctype, txt, searchfield, start, page_len, filters=None):
|
||||||
from erpnext.controllers.queries import get_fields
|
from erpnext.controllers.queries import get_fields
|
||||||
|
fields = ["name", "customer_name", "customer_group", "territory"]
|
||||||
|
|
||||||
if frappe.db.get_default("cust_master_name") == "Customer Name":
|
if frappe.db.get_default("cust_master_name") == "Customer Name":
|
||||||
fields = ["name", "customer_group", "territory"]
|
fields = ["name", "customer_group", "territory"]
|
||||||
else:
|
|
||||||
fields = ["name", "customer_name", "customer_group", "territory"]
|
|
||||||
|
|
||||||
fields = get_fields("Customer", fields)
|
fields = get_fields("Customer", fields)
|
||||||
|
|
||||||
@ -552,4 +551,4 @@ def get_customer_primary_contact(doctype, txt, searchfield, start, page_len, fil
|
|||||||
""", {
|
""", {
|
||||||
'customer': customer,
|
'customer': customer,
|
||||||
'txt': '%%%s%%' % txt
|
'txt': '%%%s%%' % txt
|
||||||
})
|
})
|
||||||
Loading…
x
Reference in New Issue
Block a user