Commit b575add0 authored by Rafael Monnerat's avatar Rafael Monnerat

ERP5SecurePayment: Use unrestrictedSearchResults to avoid security uids as Manager

  This speed up once you have to use Manager Roles during annonymous payments.
parent b16222ba
......@@ -56,7 +56,9 @@ class SecurePaymentTool(BaseTool):
def find(self, service_reference="default"):
"""Search a payment service by reference"""
if service_reference:
result = self.searchFolder(reference=service_reference)
result = self.portal_catalog.unrestrictedSearchResults(
parent_uid=self.getUid(),
reference=service_reference)
if len(result) > 0:
return result[0].getObject().__of__(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