need to be explicit that premium_id is a list or it will try to iterate through a string and fail bafflingly

pull/1/head
Andromeda Yelton 2012-05-08 10:51:04 -04:00
parent 7dbb2e2276
commit 9fc2444f37
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ def manage_campaign(request, id):
elif request.POST.has_key('inactivate') :
activetab = '#2'
if request.POST.has_key('premium_id'):
premiums_to_stop = request.POST['premium_id']
premiums_to_stop = request.POST.getlist('premium_id')
for premium_to_stop in premiums_to_stop:
selected_premium = models.Premium.objects.get(id=premium_to_stop)
if selected_premium.type == 'CU':