From 3adbd561ced57cb9c950af2d6d7d25f57f8799e0 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 abff81056..1ac95dd7e 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -5030,13 +5030,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