From 002f8995b448f051cfdb530bfa06c18d4a6a8a6b Mon Sep 17 00:00:00 2001 From: "matteo.cafarotti" Date: Sat, 4 Oct 2014 12:42:21 +0200 Subject: [PATCH] fixes inconsistency in finish_questionnaire method --- questionnaire/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/questionnaire/views.py b/questionnaire/views.py index 4994b7a..abb1c6f 100644 --- a/questionnaire/views.py +++ b/questionnaire/views.py @@ -264,7 +264,7 @@ def redirect_to_qs(runinfo, request=None): # empty ? if not hasquestionset: logging.warn('no questionset in questionnaire which passes the check') - return finish_questionnaire(runinfo, qs.questionnaire) + return finish_questionnaire(request, runinfo, qs.questionnaire) if not use_session: args = [runinfo.random, runinfo.questionset.sortid] @@ -468,12 +468,12 @@ def questionnaire(request, runcode=None, qs=None): request.session['prev_runcode'] = runinfo.random if next is None: # we are finished - return finish_questionnaire(runinfo, questionnaire) + return finish_questionnaire(request, runinfo, questionnaire) transaction.commit() return redirect_to_qs(runinfo, request) -def finish_questionnaire(runinfo, questionnaire): +def finish_questionnaire(request, runinfo, questionnaire): hist = RunInfoHistory() hist.subject = runinfo.subject hist.runid = runinfo.runid