needed some exception handling

pull/1/head
Andromeda Yelton 2011-11-01 16:21:38 -04:00
parent 9e395e0a9f
commit 60f29fc98c
1 changed files with 7 additions and 4 deletions

View File

@ -58,10 +58,13 @@ def supporter(request, supporter_username):
transet = Transaction.objects.all().filter(user = supporter)
for transaction in transet:
if(transaction.campaign.status == 'SUCCESSFUL'):
backed += 1
elif(transaction.campaign.status == 'ACTIVE'):
backing += 1
try:
if(transaction.campaign.status == 'SUCCESSFUL'):
backed += 1
elif(transaction.campaign.status == 'ACTIVE'):
backing += 1
except:
continue
wished = supporter.wishlist.works.count()