mirror of
https://github.com/django/django.git
synced 2025-08-22 11:34:33 +00:00
Simplified dict initialization in two places.
This commit is contained in:
parent
7a48f9abf2
commit
917100eed7
2 changed files with 9 additions and 10 deletions
|
@ -982,8 +982,10 @@ class OrderBy(BaseExpression):
|
|||
def as_sql(self, compiler, connection):
|
||||
connection.ops.check_expression_support(self)
|
||||
expression_sql, params = compiler.compile(self.expression)
|
||||
placeholders = {'expression': expression_sql}
|
||||
placeholders['ordering'] = 'DESC' if self.descending else 'ASC'
|
||||
placeholders = {
|
||||
'expression': expression_sql,
|
||||
'ordering': 'DESC' if self.descending else 'ASC',
|
||||
}
|
||||
return (self.template % placeholders).rstrip(), params
|
||||
|
||||
def get_group_by_cols(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue