From b36564f638d28e6a0d9460cad13357948856d39d Mon Sep 17 00:00:00 2001 From: Bertrand Bordage Date: Wed, 27 Feb 2019 00:08:30 +0100 Subject: [PATCH] Fixes an error occurring when a validation error occurs nested in a ListBlock. --- wagtail/core/blocks/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wagtail/core/blocks/utils.py b/wagtail/core/blocks/utils.py index 7cd72267370..d042dde8c7a 100644 --- a/wagtail/core/blocks/utils.py +++ b/wagtail/core/blocks/utils.py @@ -35,7 +35,9 @@ def get_non_block_errors(errors): errors_data = errors_data[0].params if errors_data is None: return errors - return errors_data.get(NON_FIELD_ERRORS, ()) + if isinstance(errors_data, dict): + return errors_data.get(NON_FIELD_ERRORS, ()) + return () class BlockData: