mirror of
https://github.com/django/django.git
synced 2025-12-04 00:55:36 +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:
parent
93e721a0b8
commit
4d48ddd8f9
3 changed files with 12 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue