revert ab1ac13909
(enable group_by again
This commit is contained in:
parent
2fbe881935
commit
499c6ebc56
1 changed files with 2 additions and 4 deletions
|
@ -228,13 +228,11 @@ class Parser(object):
|
||||||
self._joins = []
|
self._joins = []
|
||||||
conditions = self.parse_conditions(data.get('query', {}).get('conditions', []),
|
conditions = self.parse_conditions(data.get('query', {}).get('conditions', []),
|
||||||
data.get('query', {}).get('operator', '&'))
|
data.get('query', {}).get('operator', '&'))
|
||||||
n = len(self._joins)
|
|
||||||
for c in conditions:
|
for c in conditions:
|
||||||
if self._joins:
|
if self._joins:
|
||||||
qs = qs.join(self._joins.pop(0))
|
qs = qs.join(self._joins.pop(0))
|
||||||
qs = qs.filter(c)
|
qs = qs.filter(c)
|
||||||
# FIXME: group_by needed here to avoid
|
# FIXME: group_by needed here to avoid
|
||||||
# duplicates due to joins
|
# duplicates due to joins.
|
||||||
#if n:
|
qs = qs.group_by(self._model.id)
|
||||||
# qs = qs.group_by(self._model.id)
|
|
||||||
return qs
|
return qs
|
||||||
|
|
Loading…
Reference in a new issue