From b0c2ded8e95dcf61b36685fec4b40d9bcf82bef0 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 19 Mar 2025 11:54:38 +0100 Subject: 🚑️ fix huge performance problems on permissions when too many items are attached MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 012bf920d..b5e6d705b 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -5510,13 +5510,13 @@ class Document( query_own_list.append((rel_model + "__", q_own_dct)) q = None for prefix, owns in query_own_list: - subq = cls._construct_query_own(prefix, owns) + subq = cls._construct_query_own(cls, prefix, owns) if subq: if not q: q = subq else: q |= subq - q |= cls._construct_query_own("", [{"history_creator": ishtaruser.user_ptr}]) + q |= cls._construct_query_own(cls, "", [{"history_creator": ishtaruser.user_ptr}]) return q def get_associated_operation(self): -- cgit v1.2.3