summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-09 14:32:28 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-09 14:32:28 +0200
commit8c3d4988fddebd8e797a92e2c9203f67f2d7a28f (patch)
treeaf639c67b2f1637d4a8526776e556906a3fbe882 /archaeological_operations/models.py
parent4ebe47362d27a8bc824e12aee25f958eacb81a38 (diff)
downloadIshtar-8c3d4988fddebd8e797a92e2c9203f67f2d7a28f.tar.bz2
Ishtar-8c3d4988fddebd8e797a92e2c9203f67f2d7a28f.zip
Shortcut menu: show all dependent items of pinned but not own parent item
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 701ae4593..228e9859e 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -300,10 +300,11 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
@classmethod
def get_owns(cls, user, menu_filtr=None):
- extra_query = {}
+ replace_query = {}
if menu_filtr:
- extra_query = {'associated_file': menu_filtr}
- owns = super(Operation, cls).get_owns(user, extra_query=extra_query)
+ replace_query = {'associated_file': menu_filtr}
+ owns = super(Operation, cls).get_owns(
+ user, replace_query=replace_query)
# owns = owns.annotate(null_count=Count('operation_code'))
# return owns.order_by("common_name", "-year", "operation_code")
return sorted(owns, key=lambda x: x.cached_label)