From f22520ef418ec00bba44bcbf53208cedbacc2b84 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 6 Jan 2014 13:34:45 +0100 Subject: Archaeological files: improve shortcut - add shortcut for person in charge (refs #1561) --- archaeological_files/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 95bf79dc8..293608f0c 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -187,7 +187,8 @@ class File(BaseHistorizedItem, OwnPerms, ValueGetter): @classmethod def get_query_owns(cls, user): - return Q(history_modifier=user) & Q(end_date__isnull=True) + return (Q(history_modifier=user) | Q(in_charge__ishtaruser=user)) \ + & Q(end_date__isnull=True) def is_active(self): return not bool(self.end_date) -- cgit v1.2.3