mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #26290 -- Warned that paginating an unordered QuerySet may result in inconsistent results.
This commit is contained in:
@@ -27,7 +27,7 @@ class SimpleI18nSitemap(Sitemap):
|
||||
i18n = True
|
||||
|
||||
def items(self):
|
||||
return I18nTestModel.objects.all()
|
||||
return I18nTestModel.objects.order_by('pk').all()
|
||||
|
||||
|
||||
class EmptySitemap(Sitemap):
|
||||
@@ -115,7 +115,7 @@ sitemaps_lastmod_descending = OrderedDict([
|
||||
])
|
||||
|
||||
generic_sitemaps = {
|
||||
'generic': GenericSitemap({'queryset': TestModel.objects.all()}),
|
||||
'generic': GenericSitemap({'queryset': TestModel.objects.order_by('pk').all()}),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user