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, on the CKAN side the navl functions drop the field entirely (somewhere along make_full_schema and get_all_key_combinations) and it doesn't get stored as an extra, so it's missing from the resulting dataset dict.
{
"name": "test-dataset",
}
@wardi Ideally we would want an empty list in the resulting dataset, but do you think a missing field is an improvement?
It would be nicer to be able to store an empty list, but a missing value is an improvement over a list with one object with blank fields for sure.