diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2014-01-06 13:34:45 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2014-01-06 13:34:45 +0100 |
commit | f22520ef418ec00bba44bcbf53208cedbacc2b84 (patch) | |
tree | 62bb0794c25afef8c951b94c93b8c62ebee149c2 | |
parent | e177200278d2a9a8ea1e2ae0b811705c59b8e68b (diff) | |
download | Ishtar-f22520ef418ec00bba44bcbf53208cedbacc2b84.tar.bz2 Ishtar-f22520ef418ec00bba44bcbf53208cedbacc2b84.zip |
Archaeological files: improve shortcut - add shortcut for person in charge (refs #1561)
-rw-r--r-- | archaeological_files/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |