[fix] resolved merge conflicts

This commit is contained in:
Saurabh
2018-05-15 13:02:40 +05:30
10 changed files with 100 additions and 36 deletions

View File

@@ -77,8 +77,8 @@ class Project(Document):
def validate_weights(self):
sum = 0
for task in self.tasks:
if task.task_weight or 0 > 0:
sum = sum + task.task_weight
if task.task_weight > 0:
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"))