mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #30463 -- Fixed crash of deprecation message when Meta.ordering contains expressions.
Regression in 1b1f64ee5a.
This commit is contained in:
committed by
Mariusz Felisiak
parent
e86cc14bd3
commit
04042b2b44
@@ -408,7 +408,9 @@ class OrderingTests(TestCase):
|
||||
def test_deprecated_values_annotate(self):
|
||||
msg = (
|
||||
"Article QuerySet won't use Meta.ordering in Django 3.1. Add "
|
||||
".order_by('-pub_date', 'headline') to retain the current query."
|
||||
".order_by('-pub_date', 'headline', OrderBy(F(author__name), "
|
||||
"descending=False), OrderBy(F(second_author__name), "
|
||||
"descending=False)) to retain the current query."
|
||||
)
|
||||
with self.assertRaisesMessage(RemovedInDjango31Warning, msg):
|
||||
list(Article.objects.values('author').annotate(Count('headline')))
|
||||
|
||||
Reference in New Issue
Block a user