-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IntegrityError null value in column "prefill_plugin" of relation "forms_formvariable" violates not-null constraint #3922
IntegrityError null value in column "prefill_plugin" of relation "forms_formvariable" violates not-null constraint #3922
Comments
… plugin or attribute null values are okay-ish in the Javascript code, but cause constraint errors when the component is used to populate a FormVariable in the backend which does not allow NULL values.
…ll properties null leads to database constraint issues in the backend, the empty value should just be an empty string.
…pty value than null null is not necessarily always an acceptable value for a field that was cleared, so the select component now takes an optional emptyValue prop that will be set when the (single) select is cleared. For multi selects, the empty array as a value still makes sense.
…ll properties null leads to database constraint issues in the backend, the empty value should just be an empty string.
I was a bit baffled why this only manifests during copying (and likely import) of a form and not during the normal form editing, but I could find out that the JS actually cleans up these
While the backend does:
So the backend patch will make this a bit more robust and also add a data/import fix to convert component configurations (again). |
…y values This applies the same behaviour as what the frontend does.
…y values This applies the same behaviour as what the frontend does.
Re-apply the component conversion operation on existing data, as the new form builder caused new, corrupt, prefill configuration to be saved in the backend. Imports should not be affected, because the existing converter was still wired up. Form copying was patched in the previous commit to be a bit more robust, this data migration only exists to tidy up and remove confusion.
… plugin or attribute null values are okay-ish in the Javascript code, but cause constraint errors when the component is used to populate a FormVariable in the backend which does not allow NULL values.
…pty value than null null is not necessarily always an acceptable value for a field that was cleared, so the select component now takes an optional emptyValue prop that will be set when the (single) select is cleared. For multi selects, the empty array as a value still makes sense.
…ll properties null leads to database constraint issues in the backend, the empty value should just be an empty string.
…ll properties null leads to database constraint issues in the backend, the empty value should just be an empty string. Backport-of: #127
…y values This applies the same behaviour as what the frontend does.
Re-apply the component conversion operation on existing data, as the new form builder caused new, corrupt, prefill configuration to be saved in the backend. Imports should not be affected, because the existing converter was still wired up. Form copying was patched in the previous commit to be a bit more robust, this data migration only exists to tidy up and remove confusion.
…y values This applies the same behaviour as what the frontend does. Backport-of: #3951
Product versie / Product version
2.5.x (new form builder)
Omschrijf het probleem / Describe the bug
when copying a form that contains a textfield a 500 occurs.
the cause seems to be:
which is included in new textfields. removing this part from the json fixes the issue in the form builder
Tasks
null
in TS types Disallow null values for prefill plugin or attribute types#44null
Fix default/empty values for component prefill configuration formio-builder#127null
s and change them into empty stringThe text was updated successfully, but these errors were encountered: