Merge pull request #17518 from rohitwaghchaure/customer_not_able_to_save

fix: not able to save customer if contribution is not set
This commit is contained in:
rohitwaghchaure
2019-05-08 14:33:44 +05:30
committed by GitHub

View File

@@ -61,7 +61,7 @@ class Customer(TransactionBase):
self.loyalty_program_tier = customer.loyalty_program_tier
if self.sales_team:
if sum([member.allocated_percentage for member in self.sales_team]) != 100:
if sum([member.allocated_percentage or 0 for member in self.sales_team]) != 100:
frappe.throw(_("Total contribution percentage should be equal to 100"))
def check_customer_group_change(self):