summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-01-02 15:33:56 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-01-02 15:33:56 +0100
commitcd6fd329f22241a6a3dd14a14c579bdf1831677d (patch)
tree6e8ffab7918d9a8519d2c45bb95dea18cdd9bf99 /archaeological_operations/models.py
parent535a71c99f4961113821ae60327edc44b01fdf9e (diff)
downloadIshtar-cd6fd329f22241a6a3dd14a14c579bdf1831677d.tar.bz2
Ishtar-cd6fd329f22241a6a3dd14a14c579bdf1831677d.zip
Manage multiple condition for cascading shortcut menu - Manage shortcut menu for treatment and treatment files (refs #3384)
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 7507da817..0270a0c74 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -377,9 +377,9 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
@classmethod
def get_owns(cls, user, menu_filtr=None, limit=None):
- replace_query = {}
- if menu_filtr:
- replace_query = {'associated_file': menu_filtr}
+ replace_query = None
+ if menu_filtr and 'file' in menu_filtr:
+ replace_query = Q(associated_file=menu_filtr['file'])
owns = super(Operation, cls).get_owns(
user, replace_query=replace_query,
limit=limit)