From d7914bfd538d571226ffb76c624e810d991aba4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 13 Mar 2017 23:02:12 +0100 Subject: [PATCH] Do not return None for duration_to_invoice on effort The method must always return a timedelta or no values because it is summed later by sum_tree. issue6346 review31171002 --- work.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work.py b/work.py index ed42b74278..2934599a51 100644 --- a/work.py +++ b/work.py @@ -143,7 +143,7 @@ class Work: @staticmethod def _get_duration_to_invoice_effort(works): return dict((w.id, w.effort_duration) for w in works - if w.state == 'done' and not w.invoice_line) + if w.state == 'done' and not w.invoice_line and w.effort_duration) @staticmethod def _get_duration_to_invoice_progress(works):