From a7e44cd7b426211d6c9f674e6635059bf784c855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 6 May 2015 18:24:00 +0200 Subject: [PATCH] Force computed duration to be a timedelta in any cases issue4722 review14241002 --- work.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/work.py b/work.py index 7656ecc3b2..48372062b7 100644 --- a/work.py +++ b/work.py @@ -110,8 +110,9 @@ class Work: leafs.add(work.id) total_allocation = 0 - if not work.allocations or not work.effort_duration: - durations[work.id] = work.effort_duration + if not work.allocations: + durations[work.id] = (work.effort_duration + or datetime.timedelta()) continue for allocation in work.allocations: total_allocation += allocation.percentage