From 35b909c78395c5b3a735fdf052adc9a25e8ff08e Mon Sep 17 00:00:00 2001 From: Amit Dodiya Date: Tue, 12 Feb 2013 13:06:10 +0530 Subject: [PATCH] [FIX]survey: while adding the question from edit survey wizard gives traceback bzr revid: ado@tinyerp.com-20130212073610-8mrpjpk2hyt5tzzd --- addons/survey/survey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/survey/survey.py b/addons/survey/survey.py index 241b9739016..50f00c978a0 100644 --- a/addons/survey/survey.py +++ b/addons/survey/survey.py @@ -502,7 +502,7 @@ class survey_question(osv.osv): def create(self, cr, uid, vals, context=None): minimum_ans = 0 maximum_ans = 0 - page = self.pool.get('survey.page').browse(cr, uid, vals['page_id'], context=context).title + page = self.pool.get('survey.page').browse(cr, uid, vals.get('page_id'), context=context).title if vals.has_key('answer_choice_ids') and not len(vals['answer_choice_ids']): if vals.has_key('type') and vals['type'] not in ['descriptive_text', 'single_textbox', 'comment','table']: raise osv.except_osv(_('Warning!'),_('You must enter one or more answers for question "%s" of page %s .') % (vals['question'], page))