fix: Ignore missing customer group while fetching price list

(cherry picked from commit e5fb871ef4)
This commit is contained in:
Saqib Ansari
2022-03-10 13:54:43 +05:30
committed by mergify-bot
parent bb0be1699b
commit 3f0a4d9921

View File

@@ -171,10 +171,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):