Skip to content

Commit

Permalink
👌 [#3443] PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Sep 20, 2023
1 parent 549afa1 commit 563db37
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def add_date_component_settings(apps, schema_editor):
translated_errors[language_code]["minDate"] = ""
translated_errors[language_code]["maxDate"] = ""

custom_options = comp.get("customOptions", {})
custom_options["allowInvalidPreload"] = True
comp.setdefault("customOptions", {})
comp["customOptions"]["allowInvalidPreload"] = True

form_definitions_to_update.append(form_definition)

Expand Down
16 changes: 15 additions & 1 deletion src/openforms/forms/tests/test_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,16 @@ def setUpBeforeMigration(self, apps):
"en": {"required": ""},
"nl": {"required": ""},
},
}
},
{
"key": "anotherDateComponent",
"type": "date",
"label": "Another Date component",
"translatedErrors": {
"en": {"required": ""},
"nl": {"required": ""},
},
},
]
},
)
Expand Down Expand Up @@ -112,3 +121,8 @@ def test_new_settings(self):
"allowInvalidPreload"
]
)
self.assertTrue(
self.form_def.configuration["components"][1]["customOptions"][
"allowInvalidPreload"
]
)

0 comments on commit 563db37

Please sign in to comment.