fix: Ignore missing customer group while fetching price list

This commit is contained in:
Saqib Ansari 2022-03-10 13:54:43 +05:30
parent 9dc9758522
commit e5fb871ef4

View File

@ -170,10 +170,7 @@ def get_default_price_list(party):
return party.default_price_list
if party.doctype == "Customer":
try:
return frappe.get_cached_value("Customer Group", party.customer_group, "default_price_list")
except frappe.exceptions.DoesNotExistError:
return
return frappe.db.get_value("Customer Group", party.customer_group, "default_price_list")
def set_price_list(party_details, party, party_type, given_price_list, pos=None):