[FIX] orm: searching an inexisting id (as integer) return False (patch from Activity Solutions)
bzr revid: christophe@tinyerp.com-20081205124158-hjmig1c8gyp9qme3
This commit is contained in:
parent
b9a785f886
commit
eb08809553
|
@ -1801,7 +1801,7 @@ class orm(orm_template):
|
||||||
if v == None:
|
if v == None:
|
||||||
r[key] = False
|
r[key] = False
|
||||||
if isinstance(ids, (int, long)):
|
if isinstance(ids, (int, long)):
|
||||||
return result[0]
|
return result and result[0] or False
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _read_flat(self, cr, user, ids, fields_to_read, context=None, load='_classic_read'):
|
def _read_flat(self, cr, user, ids, fields_to_read, context=None, load='_classic_read'):
|
||||||
|
|
Loading…
Reference in New Issue