summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
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
commitebb67ddbc918ca0e2c4f3082a45bb7f12ecb21eb (patch)
treedbcd431ac135fecd86d95ecf938fe52207d5fb8b /ishtar_common
parent90773c4c3d7e5b0e5ef35c4c25c9cdcb04281d15 (diff)
downloadIshtar-ebb67ddbc918ca0e2c4f3082a45bb7f12ecb21eb.tar.bz2
Ishtar-ebb67ddbc918ca0e2c4f3082a45bb7f12ecb21eb.zip
🐛 fix get own function for biographical notes (old behaviour)
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py4
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)