base: improve ir_default for _get_company_id

bzr revid: ced-ac9a616c3f789c5e622c24bf887e197c617789f1
This commit is contained in:
ced 2007-07-04 11:27:33 +00:00
parent be4eb5d379
commit a231e3684b
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class ir_default(osv.osv):
def _get_company_id(self, cr, uid, context={}):
res = self.pool.get('res.users').read(cr, uid, [uid], ['company_id'], context=context)
if res:
if res and res[0]['company_id']:
return res[0]['company_id'][0]
return False