Skip to content

Commit

Permalink
🐛 [#4765] Fixed bug in fix_empty_default_value migration
Browse files Browse the repository at this point in the history
In case the `multiple` is true, but the `defaultValue` is set to None, the migration tried to iterable over None value
  • Loading branch information
robinmolen committed Oct 16, 2024
1 parent 85bf9f0 commit 0b77826
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/openforms/formio/migration_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ def fix_empty_default_value(component: Component) -> bool:
changed = False

if component.get("multiple", False):
if default_value is None:
component["defaultValue"] = []
return True

for index, value in enumerate(default_value):
if value is None:
component["defaultValue"][index] = ""
Expand Down

0 comments on commit 0b77826

Please sign in to comment.