From 77f51325c65673210c6468a9afaae616db744423 Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Fri, 30 Sep 2011 12:50:04 +0530 Subject: [PATCH] [BUG/FIX] survey : safe_evaling the dict of the stored answer in select survey wizard defalt_get bzr revid: jam@tinyerp.com-20110930072004-vkev6k0bsr6imld4 --- addons/survey/wizard/survey_answer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py index be43a409774..332b74cc660 100644 --- a/addons/survey/wizard/survey_answer.py +++ b/addons/survey/wizard/survey_answer.py @@ -30,6 +30,7 @@ from osv import fields from tools import to_xml from tools.translate import _ import addons +from tools.safe_eval import safe_eval class survey_question_wiz(osv.osv_memory): _name = 'survey.question.wiz' @@ -522,7 +523,7 @@ class survey_question_wiz(osv.osv_memory): sur_name_read = surv_name_wiz.read(cr, uid, context.get('sur_name_id',False)) ans_list = [] - for key,val in sur_name_read['store_ans'].items(): + for key,val in safe_eval(sur_name_read.get('store_ans',"{}")).items(): for field in fields_list: if field in list(val): value[field] = val[field]