[FIX] survey: in prepare_result, result_summary variable could be returned without being initialized (error in question.type maybe, but anyway should be more secure)

This commit is contained in:
Thibault Delavallée 2014-08-27 14:59:03 +02:00
parent 287ea2fb17
commit ce5b5e6ba5
1 changed files with 1 additions and 0 deletions

View File

@ -347,6 +347,7 @@ class survey_survey(osv.Model):
''' Compute statistical data for questions by counting number of vote per choice on basis of filter '''
current_filters = current_filters if current_filters else []
context = context if context else {}
result_summary = {}
#Calculate and return statistics for choice
if question.type in ['simple_choice', 'multiple_choice']: