mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 15:39:20 +00:00
Merge pull request #13303 from achillesrasquinha/py3
unordered types None vs int
This commit is contained in:
@@ -76,7 +76,7 @@ class Project(Document):
|
|||||||
def validate_weights(self):
|
def validate_weights(self):
|
||||||
sum = 0
|
sum = 0
|
||||||
for task in self.tasks:
|
for task in self.tasks:
|
||||||
if task.task_weight > 0:
|
if task.task_weight or 0 > 0:
|
||||||
sum = sum + task.task_weight
|
sum = sum + task.task_weight
|
||||||
if sum > 0 and sum != 1:
|
if sum > 0 and sum != 1:
|
||||||
frappe.throw(_("Total of all task weights should be 1. Please adjust weights of all Project tasks accordingly"))
|
frappe.throw(_("Total of all task weights should be 1. Please adjust weights of all Project tasks accordingly"))
|
||||||
|
|||||||
Reference in New Issue
Block a user