From a4a62d5ea16e46c702573db754bd4489e4f872a9 Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Thu, 15 Mar 2018 12:18:37 +0530 Subject: [PATCH] unordered types None vs int --- erpnext/projects/doctype/project/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index d920a09113..221c1d3137 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -76,7 +76,7 @@ class Project(Document): def validate_weights(self): sum = 0 for task in self.tasks: - if task.task_weight > 0: + if task.task_weight or 0 > 0: sum = sum + task.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"))