summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/models.py')
-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)