From eb0880955379c1d033ae57871211dcdcffa585a9 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 5 Dec 2008 13:41:58 +0100 Subject: [PATCH] [FIX] orm: searching an inexisting id (as integer) return False (patch from Activity Solutions) bzr revid: christophe@tinyerp.com-20081205124158-hjmig1c8gyp9qme3 --- bin/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 0803a7ace38..8a883729e79 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1801,7 +1801,7 @@ class orm(orm_template): if v == None: r[key] = False if isinstance(ids, (int, long)): - return result[0] + return result and result[0] or False return result def _read_flat(self, cr, user, ids, fields_to_read, context=None, load='_classic_read'):