From 7d0e74e42b489b5dc31632fd941d7c99d2f891dc Mon Sep 17 00:00:00 2001 From: collerek Date: Sun, 7 Mar 2021 16:11:19 +0100 Subject: [PATCH] remove groupby --- ormar/queryset/query.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ormar/queryset/query.py b/ormar/queryset/query.py index 80ee4a7..66d7e8c 100644 --- a/ormar/queryset/query.py +++ b/ormar/queryset/query.py @@ -186,7 +186,6 @@ class Query: exclude=True).apply( limit_qry ) - limit_qry = limit_qry.group_by(sqlalchemy.text(f"{pk_aliased_name}")) limit_qry = OrderQuery(sorted_orders=self.sorted_orders).apply(limit_qry) limit_qry = limit_qry.alias("inner_limit_query") outer_text = sqlalchemy.text(f"distinct limit_column")