revert ab1ac13909 (enable group_by again

This commit is contained in:
j 2016-01-04 17:44:05 +05:30
parent 2fbe881935
commit 499c6ebc56

View file

@ -228,13 +228,11 @@ class Parser(object):
self._joins = []
conditions = self.parse_conditions(data.get('query', {}).get('conditions', []),
data.get('query', {}).get('operator', '&'))
n = len(self._joins)
for c in conditions:
if self._joins:
qs = qs.join(self._joins.pop(0))
qs = qs.filter(c)
# FIXME: group_by needed here to avoid
# duplicates due to joins
#if n:
# qs = qs.group_by(self._model.id)
# duplicates due to joins.
qs = qs.group_by(self._model.id)
return qs