Commits

Anonymous committed fd8211c

fix choice form to use 1.2 cleaned

  • Participants
  • Parent commits 670fd3d

Comments (0)

Files changed (1)

File gaepuv/puv/poll/forms.py

         super(ChoiceForm, self).__init__(*args, **kwargs)
         
     def save(self):
-        choice = self.clean_data['choice']
+        cleaned = super(ChoiceForm, self).clean()
+        choice = cleaned.get('choice','')
         url = None
         if choice == USE_ADDR:
             choice = ''
 
         entry = models.Choice(poll = self.poll, 
                               choice = choice,
-                              location = self.clean_data['location'],
-                              address = self.clean_data['address'],
+                              location = cleaned.get('location',''),
+                              address = cleaned.get('address',''),
                               url = url)
         entry.put()