Merge pull request #476 from Gluejar/purchase_button

fix exception when no radio
pull/1/head
Raymond Yee 2015-04-17 13:36:39 -07:00
commit f676d116aa
1 changed files with 1 additions and 2 deletions

View File

@ -1283,12 +1283,11 @@ class PurchaseView(PledgeView):
self.data = {
'preapproval_amount':self.get_preapproval_amount(),
'anonymous':self.request.user.profile.anon_pref,
'offer_id': self.offer_id,
}
if self.request.method == 'POST':
self.data.update(self.request.POST.dict())
self.data['give'] = self.give
if self.give:
self.data['offer_id'] = self.offer_id
if not self.request.POST.has_key('anonymous'):
del self.data['anonymous']
return {'data':self.data}