app/soc/views/models/survey.py
changeset 2504 74b115310fb0
parent 2503 c14a754b0644
child 2516 afae8791ad97
--- a/app/soc/views/models/survey.py	Fri Jul 03 14:36:16 2009 +0200
+++ b/app/soc/views/models/survey.py	Fri Jul 03 14:43:49 2009 +0200
@@ -553,17 +553,15 @@
     # fetch field contents and pass request data, if any
     survey_form.getFields(post_dict=form_data)
 
-    # validate request data
-    if form_data and not survey_form.is_valid():
-      survey_form.full_clean()
-      context['survey_form'] = survey_form
-      return self._constructResponse(request, entity=None, context=context,
-          form=survey_form, params=params, template=template)
-
     # fill context with the survey and additional information
     context['survey_form'] = survey_form
     self.setHelpAndStatus(context, entity, record)
 
+    # validate request data
+    if form_data and not survey_form.is_valid():
+      return self._constructResponse(request, entity=entity, context=context,
+          form=survey_form, params=params, template=template)
+
     # call the hook method
     self._takeGet(request, template, context, params, entity, record, **kwargs)