Commit a65dda73 authored by Nicolas Delaby's avatar Nicolas Delaby

use id to getObjectList

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15102 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ba7bd437
......@@ -1029,18 +1029,20 @@ class Subscription(Folder, SyncCode):
signature = self.getSignatureFromGid(gid)
# First look if we do already have the mapping between
# the id and the gid
#XXX Slow !!!
object_list = self.getObjectList(gid=gid)
destination = self.getDestination()
if signature is not None and signature.getPath() is not None:
o_id = signature.getObjectId()
o = None
try:
o = destination.getPortalObject().restrictedTraverse(signature.getPath())
except (AttributeError, KeyError, TypeError):
pass
o_id = signature.getObjectId()
#try with id param too, because gid is not catalogged
object_list = self.getObjectList(gid = gid, id = o_id)
if o is not None and o in object_list:
return o
#XXX Slow !!!
object_list = self.getObjectList(gid = gid)
for o in object_list:
o_gid = self.getGidFromObject(o)
if o_gid == gid:
......
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