From a97bbe27ca114c7fb891d1b039c58e36fec2b007 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 9 Mar 2016 09:31:02 -0500 Subject: fixed a bug in my income projection app --- app/income/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/income/models.py') diff --git a/app/income/models.py b/app/income/models.py index ea0fa5c..9be597d 100644 --- a/app/income/models.py +++ b/app/income/models.py @@ -43,4 +43,5 @@ class Gig(models.Model): def get_pay_date(self): days = self.publisher.payment_time * 7 - return self.invoice_date + datetime.timedelta(float(days)) + if self.invoice_date: + return self.invoice_date + datetime.timedelta(float(days)) -- cgit v1.2.3-70-g09d2