From 0263bbf5e04467a50cf17f0e561d910e3d6b7469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 4 May 2013 11:46:10 +0200 Subject: [PATCH] Fix invoice method computation for task without project issue3175 review819002 (transplanted from 87f0ad1c2062f47b89e7baa895e1341cafe95f79) --- work.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/work.py b/work.py index 17f3984d2a..1b7ea0231d 100644 --- a/work.py +++ b/work.py @@ -88,8 +88,10 @@ class Work: def get_invoice_method(self, name): if self.type == 'project': return self.project_invoice_method - else: + elif self.parent: return self.parent.invoice_method + else: + return 'manual' @staticmethod def default_invoiced_hours():