mitigate bug for campaigns that didn't get a success date

pull/1/head
eric 2013-02-21 15:57:49 -05:00
parent 499b079049
commit 242cb66451
1 changed files with 4 additions and 1 deletions

View File

@ -516,7 +516,10 @@ class Campaign(models.Model):
@property
def success_date(self):
if self.status == 'SUCCESSFUL':
try:
return self.actions.filter(type='succeeded')[0].timestamp
except:
return ''
return ''