From 02d28c590856d993f298bf7962bf61901c34a114 Mon Sep 17 00:00:00 2001 From: Himanshu Warekar Date: Fri, 3 May 2019 17:55:27 +0530 Subject: [PATCH] fix: use list comprehension --- erpnext/selling/doctype/customer/customer.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 44859a1410d..892639403f2 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -61,10 +61,6 @@ class Customer(TransactionBase): self.loyalty_program_tier = customer.loyalty_program_tier if self.sales_team: - allocated_percentage = 0 - for percentage in self.sales_team: - allocated_percentage += percentage.allocated_percentage - if sum([member.allocated_percentage for member in self.sales_team]) != 100: frappe.throw(_("Total contribution percentage should be equal to 100"))