diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-12-11 15:11:02 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:45:56 +0100 |
commit | ebb67ddbc918ca0e2c4f3082a45bb7f12ecb21eb (patch) | |
tree | dbcd431ac135fecd86d95ecf938fe52207d5fb8b | |
parent | 90773c4c3d7e5b0e5ef35c4c25c9cdcb04281d15 (diff) | |
download | Ishtar-ebb67ddbc918ca0e2c4f3082a45bb7f12ecb21eb.tar.bz2 Ishtar-ebb67ddbc918ca0e2c4f3082a45bb7f12ecb21eb.zip |
🐛 fix get own function for biographical notes (old behaviour)
-rw-r--r-- | ishtar_common/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index dc3c5d29a..4958011ec 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3740,7 +3740,9 @@ class UserProfile(models.Model): # print(f"WARNING: no permission request for content {content_type.name} and profile {self}") # print("Using old behaviour") model_class = content_type.model_class() - query = model_class.get_owns(user=ishtar_user, query=True, no_auth_check=True) + query = None + if hasattr(model_class, "get_owns"): + query = model_class.get_owns(user=ishtar_user, query=True, no_auth_check=True) if query: item_ids = list( model_class.objects.filter(query).values_list("pk", flat=True) |