mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #28917 -- Prevented Paginator's unordered warning on EmptyQuerySet.
Thanks carltongibson for the idea and weijunji for the initial patch.
This commit is contained in:
committed by
Tim Graham
parent
93e721a0b8
commit
4d48ddd8f9
@@ -2024,6 +2024,9 @@ class QuerysetOrderedTests(unittest.TestCase):
|
||||
def test_explicit_ordering(self):
|
||||
self.assertIs(Annotation.objects.all().order_by('id').ordered, True)
|
||||
|
||||
def test_empty_queryset(self):
|
||||
self.assertIs(Annotation.objects.none().ordered, True)
|
||||
|
||||
def test_order_by_extra(self):
|
||||
self.assertIs(Annotation.objects.all().extra(order_by=['id']).ordered, True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user