Commit 56686a2b authored by Nicolas Delaby's avatar Nicolas Delaby

Performance improvement

Avoid implicit acquisition to access portal_catalog
parent 83aaa091
......@@ -1643,7 +1643,7 @@ class Base( CopyContainer,
"""
uid = getattr(aq_base(self), 'uid', None)
if uid is None:
self.uid = self.portal_catalog.newUid()
self.uid = self.getPortalObject().portal_catalog.newUid()
uid = getattr(aq_base(self), 'uid', None)
if uid is None:
raise DeferredCatalogError('Could neither access uid nor generate it', self)
......
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