Skip to content

Commit

Permalink
fix for a "check:requiredif to a choice+freeform question with freefo…
Browse files Browse the repository at this point in the history
…rm value filled" crash
  • Loading branch information
wardi committed Feb 24, 2012
1 parent 423a2e3 commit 1923aae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions questionnaire/views.py
Expand Up @@ -902,6 +902,12 @@ def dep_check(expr, runinfo, answerdict):

if actual_answer is None:
actual_answer = u''
elif isinstance(actual_answer, list):
# answer is freeform text, for the purpose of checks treat
# it like an empty answer.
# (comparing with predefined values would lead to madness)
actual_answer = u''

if check_answer[0:1] in "<>":
try:
actual_answer = float(actual_answer)
Expand Down

0 comments on commit 1923aae

Please sign in to comment.