Fixed Survey Take page which was erroring on undefined variables.
authorLennard de Rijk <ljvderijk@gmail.com>
Wed, 12 Aug 2009 15:44:18 -0700
changeset 2766 93e4745ebdbd
parent 2765 b1c591bb2e87
child 2767 4011d44ba0b6
Fixed Survey Take page which was erroring on undefined variables. Get me a brown paper bag please ^_^.
app/soc/views/models/survey.py
--- a/app/soc/views/models/survey.py	Wed Aug 12 13:39:40 2009 -0700
+++ b/app/soc/views/models/survey.py	Wed Aug 12 15:44:18 2009 -0700
@@ -501,11 +501,12 @@
 
     # try to get an existing SurveyRecord for the current user
     survey_record = self._getSurveyRecordFor(entity, request, params)
+    post_dict = request.POST
 
     # get an instance of SurveyTakeForm to use
     survey_form = params['survey_take_form'](
-        survey_content=survey.survey_content,
-        survey_record=record,
+        survey_content=entity.survey_content,
+        survey_record=survey_record,
         survey_logic=params['logic'],
         data=post_dict)