Fixed #28848 -- Fixed SQLite/MySQL crash when ordering by a filtered subquery that uses nulls_first/nulls_last.

This commit is contained in:
Raphael Michel 2017-11-26 17:32:17 +01:00 committed by Tim Graham
parent ad5f33ee03
commit 616f468760
3 changed files with 26 additions and 1 deletions

View file

@ -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):