if price list not found, set default selling/ buying price list from settings (#13259)

diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index 5237a71..a3a889b 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -141,7 +141,10 @@
 		price_list = get_default_price_list(party)
 
 	if not price_list:
-		price_list = given_price_list
+		if party.doctype == "Customer":
+			price_list = frappe.db.get_single_value('Selling Settings', 'selling_price_list')
+		else:
+			price_list = frappe.db.get_single_value('Buying Settings', 'buying_price_list')
 
 	if price_list:
 		out.price_list_currency = frappe.db.get_value("Price List", price_list, "currency")