From ab1ac13909d347ce1d53d9c018737059cf62898b Mon Sep 17 00:00:00 2001 From: j Date: Mon, 4 Jan 2016 16:03:37 +0530 Subject: [PATCH] temporarily disable group_by --- oml/queryparser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/oml/queryparser.py b/oml/queryparser.py index 4075b10..e228620 100644 --- a/oml/queryparser.py +++ b/oml/queryparser.py @@ -228,9 +228,13 @@ 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) - qs = qs.group_by(self._model.id) + # FIXME: group_by needed here to avoid + # duplicates due to joins + #if n: + # qs = qs.group_by(self._model.id) return qs