Switching from undefined/indeterminate queryset to a defined one. (#3468)

This commit is contained in:
Christian Peters 2017-03-20 17:46:56 +01:00 committed by Matt Westcott
parent 405a4a3fe9
commit 9257a4a1dc
3 changed files with 3 additions and 1 deletions

View file

@ -27,6 +27,7 @@ Changelog
* Fix: Page title not displaying page name when moving a page (Trent Holliday)
* Fix: The ModelAdmin module can now work without the wagtailimages and wagtaildocs apps installed (Andy Babic)
* Fix: Cloudflare error handling now handles non-string error responses correctly (hdnpl)
* Fix: Search indexing now uses a defined query ordering to prevent objects from being skipped (Christian Peters)
1.9 (16.02.2017)

View file

@ -41,6 +41,7 @@ Bug fixes
* Page title not displaying page name when moving a page (Trent Holliday)
* The ModelAdmin module can now work without the wagtailimages and wagtaildocs apps installed (Andy Babic)
* Cloudflare error handling now handles non-string error responses correctly (hdnpl)
* Search indexing now uses a defined query ordering to prevent objects from being skipped (Christian Peters)
Upgrade considerations

View file

@ -83,7 +83,7 @@ class Command(BaseCommand):
self.stdout.write('{}: {}.{} '.format(backend_name, model._meta.app_label, model.__name__).ljust(35), ending='')
# Add items (1000 at a time)
for chunk in self.print_iter_progress(self.queryset_chunks(model.get_indexed_objects())):
for chunk in self.print_iter_progress(self.queryset_chunks(model.get_indexed_objects().order_by('pk'))):
index.add_items(model, chunk)
object_count += len(chunk)