diff options
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 7d399ecd9..a0ba6c379 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -268,9 +268,9 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, @classmethod def get_owns(cls, user, menu_filtr=None, limit=None): - replace_query = {} - if menu_filtr: - replace_query = {'operation': menu_filtr} + replace_query = None + if menu_filtr and 'operation' in menu_filtr: + replace_query = Q(operation=menu_filtr['operation']) owns = super(ContextRecord, cls).get_owns( user, replace_query=replace_query, limit=limit) |