From bcb5ccf5e030611db96ca8f0ffcdb64e003c97f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 7 Jun 2008 21:18:45 +0200 Subject: [PATCH] Fix name_get of category for single id --- category.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/category.py b/category.py index 86b565706f..be01a01779 100644 --- a/category.py +++ b/category.py @@ -23,8 +23,10 @@ class Category(OSV): return dict(res) def name_get(self, cursor, user, ids, context=None): - if not len(ids): + if not ids: return [] + if isinstance(ids, (int, long)): + ids = [ids] categories = self.browse(cursor, user, ids, context=context) res = [] for category in categories: