From b540f5ad3f34b4797b2c963205ed4beb6dcb9cc3 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Thu, 19 Jan 2012 10:35:20 +0100 Subject: [PATCH] [REF] the openerplib should be fixed upstream. bzr revid: florent.xicluna@gmail.com-20120119093520-92udlqrq8ufyw43s --- addons/web/common/openerplib/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/common/openerplib/main.py b/addons/web/common/openerplib/main.py index fdcd392973d..93c2d1da69d 100644 --- a/addons/web/common/openerplib/main.py +++ b/addons/web/common/openerplib/main.py @@ -249,7 +249,7 @@ class Model(object): method, args, kw) if method == "read": - if result and isinstance(result, list) and "id" in result[0]: + if isinstance(result, list) and len(result) > 0 and "id" in result[0]: index = {} for r in result: index[r['id']] = r