From 4bb27c87194729c0a3d8b41f1af7012afc5f2a15 Mon Sep 17 00:00:00 2001 From: David Beitey Date: Tue, 20 Apr 2021 07:47:11 +0000 Subject: [PATCH] Removed unnecessary line in OrderBy.as_sql(). Unnecessary since 7286eaf681d497167cd7dc8b70ceebfcf5cd21ad. --- django/db/models/expressions.py | 1 - 1 file changed, 1 deletion(-) diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index bdd23617acf..4ecae5f02d8 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -1232,7 +1232,6 @@ class OrderBy(BaseExpression): 'ordering': 'DESC' if self.descending else 'ASC', **extra_context, } - template = template or self.template params *= template.count('%(expression)s') return (template % placeholders).rstrip(), params