summaryrefslogtreecommitdiff
path: root/django/db/models/sql/compiler.py
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:08:53 +0300
commit86c248aa646183ef4a1cb407bb3e4cb597272f63 (patch)
tree83177bc4927db57985cdf12ba2477c2cb24db7b2 /django/db/models/sql/compiler.py
parente565e1332ddfbb44fe7e6139375e3c243af7398d (diff)
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.
Diffstat (limited to 'django/db/models/sql/compiler.py')
-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 3707348968..fc5a4285a1 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -575,7 +575,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)