From 242cb664513cbb94d9482c5051696a49c41ef9a3 Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 21 Feb 2013 15:57:49 -0500 Subject: [PATCH] mitigate bug for campaigns that didn't get a success date --- core/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/models.py b/core/models.py index 6bb61d38..318d2321 100755 --- a/core/models.py +++ b/core/models.py @@ -516,7 +516,10 @@ class Campaign(models.Model): @property def success_date(self): if self.status == 'SUCCESSFUL': - return self.actions.filter(type='succeeded')[0].timestamp + try: + return self.actions.filter(type='succeeded')[0].timestamp + except: + return '' return ''