Skip to content

Commit

Permalink
Fixes an error occurring when a validation error occurs nested in a L…
Browse files Browse the repository at this point in the history
…istBlock.
  • Loading branch information
BertrandBordage committed Feb 26, 2019
1 parent 54d33a8 commit b36564f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wagtail/core/blocks/utils.py
Expand Up @@ -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:
Expand Down

0 comments on commit b36564f

Please sign in to comment.