From 46e6e042a8adf51edd44c793f3481d14c799c725 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Tue, 29 Dec 2009 15:49:55 +0000
Subject: [PATCH] fix call method content accessors for *list - use
 contentValues instead of searchFolder - call contentValues on object instance
 and not on accessor itself - call getter instead of accessing property
 directly

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31521 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/Accessor/Content.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Type/Accessor/Content.py b/product/ERP5Type/Accessor/Content.py
index 0c227940e2..90591ff698 100644
--- a/product/ERP5Type/Accessor/Content.py
+++ b/product/ERP5Type/Accessor/Content.py
@@ -117,7 +117,8 @@ class ValueListGetter(Base.Getter):
 
     def __call__(self, instance, *args, **kw):
       # We return the list of matching objects
-      return [o.getObject() for o in self.contentValues({'portal_type': self._portal_type, 'id': self._storage_id})]
+      return instance.contentValues(filter = {'portal_type': self._portal_type,
+                                              'id' : self._storage_id})
 
     psyco.bind(__call__)
 
@@ -198,7 +199,9 @@ class ListGetter(Base.Getter):
 
     def __call__(self, instance, *args, **kw):
       # We return the list of matching objects
-      return [o.relative_url for o in self.searchFolder(portal_type = self._portal_type, id = self._storage_id)]
+        return [o.getRelativeUrl() for o in
+                instance.contentValues(filter = {'portal_type': self._portal_type,
+                                                 'id' : self._storage_id})]
 
     psyco.bind(__call__)
 
-- 
2.30.9