From 37ab9efff18c046d928e428e73ae3d620bcc5143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 11 Apr 2015 11:30:28 -0400 Subject: [PATCH] Compute duration in seconds datetime.timedelta doesn't support operations with float issue4699 review11181002 --- work.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/work.py b/work.py index 511b7ffcdb..7656ecc3b2 100644 --- a/work.py +++ b/work.py @@ -115,7 +115,8 @@ class Work: continue for allocation in work.allocations: total_allocation += allocation.percentage - durations[work.id] = (work.effort_duration + durations[work.id] = datetime.timedelta( + seconds=work.effort_duration.total_seconds() / (total_allocation / 100.0)) while leafs: