fix: use list comprehension
This commit is contained in:
		
							parent
							
								
									fbed6a12d5
								
							
						
					
					
						commit
						24442af9ae
					
				| @ -61,11 +61,7 @@ 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 not allocated_percentage == 100: | ||||
| 			if sum([member.allocated_percentage for member in self.sales_team]) != 100: | ||||
| 				frappe.throw(_("Total contribution percentage should be equal to 100")) | ||||
| 
 | ||||
| 	def check_customer_group_change(self): | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user