diff options
Diffstat (limited to 'archaeological_context_records/models.py')
| -rw-r--r-- | archaeological_context_records/models.py | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 64859c185..678b0371d 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -361,11 +361,11 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms,          return reverse('show-contextrecord', args=[self.pk, ''])      @classmethod -    def get_query_owns(cls, user): -        return (Q(operation__scientist=user.ishtaruser.person) | -                Q(operation__in_charge=user.ishtaruser.person) | -                Q(operation__collaborators__pk=user.ishtaruser.person.pk) | -                Q(history_creator=user)) \ +    def get_query_owns(cls, ishtaruser): +        return (Q(operation__scientist=ishtaruser.person) | +                Q(operation__in_charge=ishtaruser.person) | +                Q(operation__collaborators__pk=ishtaruser.person.pk) | +                Q(history_creator=ishtaruser.user_ptr)) \              & Q(operation__end_date__isnull=True)      @classmethod | 
