Skip to content

Commit

Permalink
🗃️ [#4659] Added text fields to migration and test
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmolen committed Oct 14, 2024
1 parent 2d207e8 commit 5e5f530
Show file tree
Hide file tree
Showing 6 changed files with 374 additions and 16 deletions.
6 changes: 6 additions & 0 deletions src/openforms/formio/migration_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ def rename_identifier_role_authorizee(component: Component) -> bool:
component["prefill"]["identifierRole"] = "authorizee"
return True


def fix_empty_default_value(component: Component) -> bool:
default_value = component.get("defaultValue")
changed = False
Expand Down Expand Up @@ -316,9 +317,11 @@ def fix_empty_default_value(component: Component) -> bool:
},
"time": {
"move_time_validators": move_time_validators,
"fix_empty_default_value": fix_empty_default_value,
},
"phoneNumber": {
"fix_empty_validate_lengths": fix_empty_validate_lengths,
"fix_empty_default_value": fix_empty_default_value,
},
"postcode": {
"alter_prefill_default_values": alter_prefill_default_values,
Expand All @@ -332,6 +335,7 @@ def fix_empty_default_value(component: Component) -> bool:
},
"textarea": {
"fix_empty_validate_lengths": fix_empty_validate_lengths,
"fix_empty_default_value": fix_empty_default_value,
},
"number": {
"fix_empty_validate_lengths": fix_empty_validate_lengths,
Expand All @@ -348,10 +352,12 @@ def fix_empty_default_value(component: Component) -> bool:
# Special components
"iban": {
"fix_empty_validate_lengths": fix_empty_validate_lengths,
"fix_empty_default_value": fix_empty_default_value,
},
"licenseplate": {
"ensure_validate_pattern": ensure_licensplate_validate_pattern,
"fix_empty_validate_lengths": fix_empty_validate_lengths,
"fix_empty_default_value": fix_empty_default_value,
},
"bsn": {
"alter_prefill_default_values": alter_prefill_default_values,
Expand Down
Loading

0 comments on commit 5e5f530

Please sign in to comment.