summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2013-10-21 22:05:48 +0300
committerAnssi Kääriäinen <akaariai@gmail.com>2013-10-21 22:10:42 +0300
commit6781dc624318fd03032efb3182266bae0a5c8fc0 (patch)
tree555c0c7a19890857f84a4b4fbcd313346e0e5051
parent86373dc63e8e7e06c18878d97c024b40382dc875 (diff)
[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 86c248aa64 from master
-rw-r--r--django/db/models/sql/compiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index e571ef2222..ca422803a6 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -598,7 +598,7 @@ class SQLCompiler(object):
for order, order_params in ordering_group_by:
# Even if we have seen the same SQL string, it might have
# different params, so, we add same SQL in "has params" case.
- if order not in seen or params:
+ if order not in seen or order_params:
result.append(order)
params.extend(order_params)
seen.add(order)