[FIX]survey: while adding the question from edit survey wizard gives traceback
bzr revid: ado@tinyerp.com-20130212073610-8mrpjpk2hyt5tzzd
This commit is contained in:
parent
2d6180c35c
commit
35b909c783
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue