diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-19 11:54:38 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-19 12:39:22 +0100 |
commit | 3adbd561ced57cb9c950af2d6d7d25f57f8799e0 (patch) | |
tree | e2301ff31a54062c731a60774e088f073d6a89cf /archaeological_context_records/models.py | |
parent | 6468fa4c22b5ec2c30b450a5d0f8cc005d01f4be (diff) | |
download | Ishtar-3adbd561ced57cb9c950af2d6d7d25f57f8799e0.tar.bz2 Ishtar-3adbd561ced57cb9c950af2d6d7d25f57f8799e0.zip |
🚑️ fix huge performance problems on permissions when too many items are attached
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index ccc145c48..e929e9957 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -1205,13 +1205,15 @@ class ContextRecord( def get_query_owns(cls, ishtaruser): return ( cls._construct_query_own( - "operation__", Operation._get_query_owns_dicts(ishtaruser) + cls, "operation__", Operation._get_query_owns_dicts(ishtaruser) ) | cls._construct_query_own( + cls, "base_finds__find__basket__", [{"shared_with": ishtaruser, "shared_write_with": ishtaruser}], ) | cls._construct_query_own( + cls, "", [ {"history_creator": ishtaruser.user_ptr}, |