[REF] survey: Refactored.
bzr revid: uco@tinyerp.com-20110331104502-c2hdl8ldzgnpx38w
This commit is contained in:
@@ -63,7 +63,7 @@ class survey_browse_answer(osv.osv_memory):
|
||||
record = self.read(cr, uid, ids, [])
|
||||
record = record and record[0] or {}
|
||||
if record['response_id']:
|
||||
res_id = [(record['response_id'][0])]
|
||||
res_id = [(record.get('response_id') and record['response_id'][0])]
|
||||
else:
|
||||
sur_response_obj = self.pool.get('survey.response')
|
||||
res_id = sur_response_obj.search(cr, uid, [('survey_id', '=',int(record['survey_id']))])
|
||||
|
||||
Reference in New Issue
Block a user