Commit 46e6e042 authored by Aurel's avatar Aurel

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
parent 26eeff61
...@@ -117,7 +117,8 @@ class ValueListGetter(Base.Getter): ...@@ -117,7 +117,8 @@ class ValueListGetter(Base.Getter):
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
# We return the list of matching objects # 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__) psyco.bind(__call__)
...@@ -198,7 +199,9 @@ class ListGetter(Base.Getter): ...@@ -198,7 +199,9 @@ class ListGetter(Base.Getter):
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
# We return the list of matching objects # 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__) psyco.bind(__call__)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment