Initialized loyalty_point_details
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index c324292..05d4d07 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -479,6 +479,8 @@
 			fields=["company", "sum(grand_total) as grand_total", "sum(base_grand_total) as base_grand_total"]
 		)
 
+	loyalty_point_details = []
+
 	if party_type == "Customer":
 		loyalty_point_details = frappe._dict(frappe.get_all("Loyalty Point Entry",
 			filters={