Commit 44e07c77 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Update getobject based on ZCatalog-2-2-0. At the same time, fix a reversed...

Update getobject based on ZCatalog-2-2-0. At the same time, fix a reversed conditional. Thank Patrick Gerken.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4320 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7082d0e5
......@@ -704,21 +704,12 @@ class ZCatalog(Folder, Persistent, Implicit):
if REQUEST is not None and sql_catalog_id is None:
sql_catalog_id = REQUEST.get('sql_catalog_id', None)
try:
obj = self.aq_parent.unrestrictedTraverse(self.getpath(uid, sql_catalog_id=sql_catalog_id))
except ConflictError:
raise
except:
LOG('WARNING: ZSQLCatalog',0,'Could not find object for uid %s' % uid)
obj = None
if obj is not None:
path = self.getpath(uid, sql_catalog_id=sql_catalog_id)
obj = self.aq_parent.unrestrictedTraverse(path)
if not obj:
if REQUEST is None:
REQUEST=self.REQUEST
path = self.getpath(uid, sql_catalog_id=sql_catalog_id)
if path:
obj = self.resolve_url(path, REQUEST)
else:
obj = None
return obj
getObject = getobject
......
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