Commit 0cd7d04b authored by Hanno Schlichting's avatar Hanno Schlichting

Avoid the CatalogSearchArgumentsMap creation if we only get a dict as the first argument

parent 6ac74a5d
...@@ -777,7 +777,11 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -777,7 +777,11 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
'the acquired request.', 'the acquired request.',
DeprecationWarning, stacklevel=2) DeprecationWarning, stacklevel=2)
REQUEST = getattr(self, 'REQUEST', None) REQUEST = getattr(self, 'REQUEST', None)
args = CatalogSearchArgumentsMap(REQUEST, kw) if isinstance(REQUEST, dict) and not kw:
# short cut for the best practice
args = REQUEST
else:
args = CatalogSearchArgumentsMap(REQUEST, kw)
sort_index = self._getSortIndex(args) sort_index = self._getSortIndex(args)
sort_limit = self._get_sort_attr('limit', args) sort_limit = self._get_sort_attr('limit', args)
reverse = 0 reverse = 0
......
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