diff options
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 4df56c49f..a16b4cae7 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -365,9 +365,10 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, @classmethod def get_query_owns(cls, user): - return Q(operation__scientist=user.ishtaruser.person) |\ - Q(operation__in_charge=user.ishtaruser.person) |\ - Q(history_creator=user) + return (Q(operation__scientist=user.ishtaruser.person) | + Q(operation__in_charge=user.ishtaruser.person) | + Q(history_creator=user)) \ + & Q(operation__end_date__isnull=True) @classmethod def get_owns(cls, user, menu_filtr=None, limit=None, |