From 00a37971b6acdfdf6dc7b27c72c195b014d420a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 17 Mar 2014 18:59:00 +0100 Subject: [PATCH] Don't fail if effort is None issue3725 review4271003 --- work.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/work.py b/work.py index 98c0dd9c4c..f7a065d7b3 100644 --- a/work.py +++ b/work.py @@ -109,11 +109,12 @@ class Work: total_allocation = 0 if not work.allocations: - durations[work.id] = work.effort + durations[work.id] = (work.effort or 0) continue for allocation in work.allocations: total_allocation += allocation.percentage - durations[work.id] = work.effort / (total_allocation / 100.0) + durations[work.id] = ((work.effort or 0) + / (total_allocation / 100.0)) while leafs: for work_id in leafs: