1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Fixed #26290 -- Warned that paginating an unordered QuerySet may result in inconsistent results.

This commit is contained in:
Emad Mokhtar
2016-06-07 14:24:19 +03:00
committed by Tim Graham
parent 724dd2043e
commit c4980e28e5
5 changed files with 38 additions and 13 deletions

View File

@@ -194,7 +194,7 @@ class HTTPSitemapTests(SitemapTestsBase):
Check to make sure that the raw item is included with each
Sitemap.get_url() url result.
"""
test_sitemap = GenericSitemap({'queryset': TestModel.objects.all()})
test_sitemap = GenericSitemap({'queryset': TestModel.objects.order_by('pk').all()})
def is_testmodel(url):
return isinstance(url['item'], TestModel)