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

pull/3461/head^2
Christian Peters 2017-03-20 17:46:56 +01:00 zatwierdzone przez Matt Westcott
rodzic 405a4a3fe9
commit 9257a4a1dc
3 zmienionych plików z 3 dodań i 1 usunięć
docs/releases
wagtail/wagtailsearch/management/commands

Wyświetl plik

@ -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)

Wyświetl plik

@ -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

Wyświetl plik

@ -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)