equal
deleted
inserted
replaced
210 def fix_selection_and_group(rqlst, selectedidx, needwrap, selectsortterms, |
210 def fix_selection_and_group(rqlst, selectedidx, needwrap, selectsortterms, |
211 sorts, groups, having): |
211 sorts, groups, having): |
212 if selectsortterms and sorts: |
212 if selectsortterms and sorts: |
213 sort_term_selection(sorts, selectedidx, rqlst, not needwrap and groups) |
213 sort_term_selection(sorts, selectedidx, rqlst, not needwrap and groups) |
214 if sorts and groups: |
214 if sorts and groups: |
|
215 # when a query is grouped, ensure sort terms are grouped as well |
215 for sortterm in sorts: |
216 for sortterm in sorts: |
216 term = sortterm.term |
217 term = sortterm.term |
217 if not isinstance(term, Constant): |
218 if not isinstance(term, Constant): |
218 for vref in term.iget_nodes(VariableRef): |
219 for vref in term.iget_nodes(VariableRef): |
219 if not vref in groups: |
220 if not vref in groups: |