Fix a TypeError raised by a thanks campaign with no ebook
https://docs.djangoproject.com/en/1.9/releases/1.7/#templatespull/1/head
parent
cd9e2cf8ea
commit
06d240f5e4
|
@ -1332,7 +1332,11 @@ class Work(models.Model):
|
||||||
if(campaign.status == 'SUCCESSFUL'):
|
if(campaign.status == 'SUCCESSFUL'):
|
||||||
status = 6
|
status = 6
|
||||||
elif(campaign.status == 'ACTIVE'):
|
elif(campaign.status == 'ACTIVE'):
|
||||||
|
if campaign.target is not None:
|
||||||
target = float(campaign.target)
|
target = float(campaign.target)
|
||||||
|
else:
|
||||||
|
#shouldn't happen, but did once because of a failed pdf conversion
|
||||||
|
return 0
|
||||||
if target <= 0:
|
if target <= 0:
|
||||||
status = 6
|
status = 6
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue