Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.6.x] Fixed #21249 -- variable name typo in compiler.get_grouping()

The typo could have consequences in exceptional cases, but I didn't
figure out a way to actually produce such a case, so not tests.

Report & patch by Michael Manfre.

Backport of 86c248a from master
  • Loading branch information...
commit 6781dc624318fd03032efb3182266bae0a5c8fc0 1 parent 86373dc
Anssi Kääriäinen authored October 21, 2013

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/db/models/sql/compiler.py
2  django/db/models/sql/compiler.py
@@ -598,7 +598,7 @@ def get_grouping(self, having_group_by, ordering_group_by):
598 598
                 for order, order_params in ordering_group_by:
599 599
                     # Even if we have seen the same SQL string, it might have
600 600
                     # different params, so, we add same SQL in "has params" case.
601  
-                    if order not in seen or params:
  601
+                    if order not in seen or order_params:
602 602
                         result.append(order)
603 603
                         params.extend(order_params)
604 604
                         seen.add(order)

0 notes on commit 6781dc6

Please sign in to comment.
Something went wrong with that request. Please try again.