-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't store empty repeating subfields
When implementing repeating subfields without any mandatory subfields, if empty values are sent from the form an "empty" item is stored, with all its properties empties: ``` { "name": "test-dataset", "publisher": [ { "email": "", "name": "", "type": "", } ] } ``` The changes in `expand_form_composite()` fix the issue on the scheming side, preparing a `data_dict` with an empty list for that field: ``` { "name": "test-dataset", "publisher": [] } ``` Sadly, the navl functions drop the field entirely and it doesn't get stored as an extra, so it's missing from the resulting dataset dict ``` { "name": "test-dataset", } ```
- Loading branch information
Showing
3 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters