From 5e15984074f78d29031f2832b6918993dff4e7d7 Mon Sep 17 00:00:00 2001 From: Seb Date: Thu, 9 May 2019 10:41:35 +1000 Subject: [PATCH] Add type to chunk_size arg for update_index --- CHANGELOG.txt | 1 + docs/releases/2.6.rst | 1 + wagtail/search/management/commands/update_index.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0d28eb91ec..0d4173e321 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -16,6 +16,7 @@ Changelog * Fix: Explorer menu no longer shows sibling pages for which the user does not have access (Mike Hearn) * Fix: Fixed occurences of invalid HTML across the CMS admin (Thibaud Colas) * Fix: Admin HTML now includes the correct `dir` attribute for the active language (Andreas Bernacca) + * Fix: Fix type error when using `--chunk_size` argument on `./manage.py update_index` (Seb Brown) 2.5.1 (07.05.2019) diff --git a/docs/releases/2.6.rst b/docs/releases/2.6.rst index c22789e7fa..200689cc31 100644 --- a/docs/releases/2.6.rst +++ b/docs/releases/2.6.rst @@ -30,6 +30,7 @@ Bug fixes * Explorer menu no longer shows sibling pages for which the user does not have access (Mike Hearn) * Fixed occurences of invalid HTML across the CMS admin (Thibaud Colas) * Admin HTML now includes the correct ``dir`` attribute for the active language (Andreas Bernacca) + * Fix type error when using ``--chunk_size`` argument on ``./manage.py update_index`` (Seb Brown) Upgrade considerations diff --git a/wagtail/search/management/commands/update_index.py b/wagtail/search/management/commands/update_index.py index 59623dc225..88815d20a4 100644 --- a/wagtail/search/management/commands/update_index.py +++ b/wagtail/search/management/commands/update_index.py @@ -103,7 +103,7 @@ class Command(BaseCommand): '--schema-only', action='store_true', dest='schema_only', default=False, help="Prevents loading any data into the index") parser.add_argument( - '--chunk_size', action='store', dest='chunk_size', default=DEFAULT_CHUNK_SIZE, + '--chunk_size', action='store', dest='chunk_size', default=DEFAULT_CHUNK_SIZE, type=int, help="Set number of records to be fetched at once for inserting into the index") def handle(self, **options):