summaryrefslogtreecommitdiff
path: root/ishtar_common/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/views.py')
-rw-r--r--ishtar_common/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ishtar_common/views.py b/ishtar_common/views.py
index d99e7f7ef..5f37a4dbf 100644
--- a/ishtar_common/views.py
+++ b/ishtar_common/views.py
@@ -768,7 +768,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[],
alt_dct = dct.copy()
alt_dct.pop(k)
alt_dct.update(or_req)
- query = query | Q(**alt_dct)
+ query |= Q(**alt_dct)
for rtype_prefix in relation_types:
vals = list(relation_types[rtype_prefix])
@@ -793,8 +793,8 @@ def get_item(model, func_name, default_name, extra_request_keys=[],
if not dct:
# fake condition to trick Django (1.4): without it only the
# alt_dct is managed
- query = query & Q(pk__isnull=False)
- query = query | Q(**alt_dct)
+ query &= Q(pk__isnull=False)
+ query |= Q(**alt_dct)
for k, or_req in or_reqs:
altor_dct = alt_dct.copy()
altor_dct.pop(k)
@@ -805,7 +805,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[],
altor_dct[
rtype_prefix + 'right_relations__right_record__' + j] =\
val
- query = query | Q(**altor_dct)
+ query |= Q(**altor_dct)
if own:
query = query & model.get_query_owns(request.user)