diff options
| author | ruchit2801 <vithaniruchit@gmail.com> | 2019-05-17 13:00:57 +0530 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-05-18 20:05:31 +0200 |
| commit | db7d7901eeacf37f0a6f124e3733c4f121a23e76 (patch) | |
| tree | a8a2727f352155ae7259cc1fe393de4d0062d8ae /django | |
| parent | ed221f7c97de9781ca5e6dd55a9963dfbe4a89af (diff) | |
[2.2.x] Fixed #30463 -- Fixed crash of deprecation message when Meta.ordering contains expressions.
Regression in 1b1f64ee5a78cc217fead52cbae23114502cf564.
Backport of 04042b2b440f0bf50eb908d52cfe76af430e1738 from master
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/sql/compiler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index bfdf26d4db..f0daffe5c5 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -561,9 +561,9 @@ class SQLCompiler: # order_by = None warnings.warn( "%s QuerySet won't use Meta.ordering in Django 3.1. " - "Add .order_by('%s') to retain the current query." % ( + "Add .order_by(%s) to retain the current query." % ( self.query.model.__name__, - "', '".join(self._meta_ordering) + ', '.join(repr(f) for f in self._meta_ordering), ), RemovedInDjango31Warning, stacklevel=4, |
