[fix] Compounding error in task weight (#13958)
* [fix] Compounding error in task weight * [minor] minor changes * [fix] Requested Changes added
This commit is contained in:
parent
9fc5ddc26e
commit
3cf0d51e65
@ -75,7 +75,7 @@ class Project(Document):
|
||||
sum = 0
|
||||
for task in self.tasks:
|
||||
if task.task_weight > 0:
|
||||
sum = sum + task.task_weight
|
||||
sum = flt(sum + task.task_weight, task.precision('task_weight'))
|
||||
if sum > 0 and sum != 1:
|
||||
frappe.throw(_("Total of all task weights should be 1. Please adjust weights of all Project tasks accordingly"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user