summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_finds.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r--archaeological_finds/models_finds.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 6e920bc7d..b4579d4df 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -883,14 +883,14 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms,
return new
@classmethod
- def get_query_owns(cls, user):
- return (Q(base_finds__context_record__operation__scientist=user.
+ def get_query_owns(cls, ishtaruser):
+ return (Q(base_finds__context_record__operation__scientist=
ishtaruser.person) |
- Q(base_finds__context_record__operation__in_charge=user.
+ Q(base_finds__context_record__operation__in_charge=
ishtaruser.person) |
- Q(base_finds__context_record__operation__collaborators__pk=user.
+ Q(base_finds__context_record__operation__collaborators__pk=
ishtaruser.person.pk) |
- Q(history_creator=user)) \
+ Q(history_creator=ishtaruser.user_ptr)) \
& Q(base_finds__context_record__operation__end_date__isnull=True)
@classmethod
@@ -1114,13 +1114,13 @@ class FindSource(Source):
return self.find
@classmethod
- def get_query_owns(cls, user):
- return (Q(find__base_finds__context_record__operation__scientist=user.
+ def get_query_owns(cls, ishtaruser):
+ return (Q(find__base_finds__context_record__operation__scientist=
ishtaruser.person) |
- Q(find__base_finds__context_record__operation__in_charge=user.
+ Q(find__base_finds__context_record__operation__in_charge=
ishtaruser.person) |
Q(
- find__base_finds__context_record__operation__collaborators__pk=user.
+ find__base_finds__context_record__operation__collaborators__pk=
ishtaruser.person.pk)) \
& Q(
find__base_finds__context_record__operation__end_date__isnull=True)