summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRaphael Michel <mail@raphaelmichel.de>2017-11-26 17:32:17 +0100
committerTim Graham <timograham@gmail.com>2017-11-27 11:35:44 -0500
commit616f468760e4984915bb2ccca6b9eb3d80ddadb0 (patch)
treecad04f0b1ba32bf432419cedccec4f3809a16a49 /django
parentad5f33ee03edd26c7947e9beab949a6a8bfdb16f (diff)
Fixed #28848 -- Fixed SQLite/MySQL crash when ordering by a filtered subquery that uses nulls_first/nulls_last.
Diffstat (limited to 'django')
-rw-r--r--django/db/models/expressions.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py
index e03538932e..82db5c8bf8 100644
--- a/django/db/models/expressions.py
+++ b/django/db/models/expressions.py
@@ -1106,6 +1106,7 @@ class OrderBy(BaseExpression):
}
placeholders.update(extra_context)
template = template or self.template
+ params *= template.count('%(expression)s')
return (template % placeholders).rstrip(), params
def as_sqlite(self, compiler, connection):