--- a/cubicweb/rqlrewrite.py Tue Oct 09 16:24:12 2018 +0200
+++ b/cubicweb/rqlrewrite.py Mon Oct 29 10:04:31 2018 +0100
@@ -278,10 +278,10 @@
nbtrees = len(localchecks)
myunion = union = select.parent
# transform in subquery when len(localchecks)>1 and groups
- if nbtrees > 1 and (select.orderby or select.groupby or
- select.having or select.has_aggregat or
- select.distinct or
- select.limit or select.offset):
+ if nbtrees > 1 and (select.orderby or select.groupby
+ or select.having or select.has_aggregat
+ or select.distinct
+ or select.limit or select.offset):
newselect = stmts.Select()
# only select variables in subqueries
origselection = select.selection