Commit d7d02187 authored by Romain Courteaud's avatar Romain Courteaud Committed by Alain Takoudjou

Reduce number of JOIN

parent f5924f5b
...@@ -86,8 +86,9 @@ class AcknowledgeableMixin: ...@@ -86,8 +86,9 @@ class AcknowledgeableMixin:
person_value = self.ERP5Site_getAuthenticatedMemberPersonValue( person_value = self.ERP5Site_getAuthenticatedMemberPersonValue(
user_name=user_name) user_name=user_name)
if len(self.portal_catalog(portal_type='Acknowledgement', if len(self.portal_catalog(portal_type='Acknowledgement',
causality_relative_url=self.getRelativeUrl(), default_causality_uid=self.getUid(),
destination_relative_url=person_value.getRelativeUrl())) > 0: default_destination_uid=person_value.getUid(),
limit=1)) > 0:
result = True result = True
return result return result
......
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