mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2024-11-22 00:56:34 +03:00
Fixed invalid condtion joins in _filter_or_exclude (multiple_exclude_test)
This commit is contained in:
parent
375316fbf3
commit
d1e61dc420
|
@ -411,9 +411,10 @@ class QuerySet(object):
|
||||||
def _filter_or_exclude(self, *q, **kwargs):
|
def _filter_or_exclude(self, *q, **kwargs):
|
||||||
reverse = kwargs.pop('reverse', False)
|
reverse = kwargs.pop('reverse', False)
|
||||||
prewhere = kwargs.pop('prewhere', False)
|
prewhere = kwargs.pop('prewhere', False)
|
||||||
condition = copy(self._where_q)
|
|
||||||
qs = copy(self)
|
qs = copy(self)
|
||||||
|
|
||||||
|
condition = Q()
|
||||||
for q_obj in q:
|
for q_obj in q:
|
||||||
condition &= q_obj
|
condition &= q_obj
|
||||||
|
|
||||||
|
@ -423,6 +424,7 @@ class QuerySet(object):
|
||||||
if reverse:
|
if reverse:
|
||||||
condition = ~condition
|
condition = ~condition
|
||||||
|
|
||||||
|
condition = copy(self._prewhere_q if prewhere else self._where_q) & condition
|
||||||
if prewhere:
|
if prewhere:
|
||||||
qs._prewhere_q = condition
|
qs._prewhere_q = condition
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user