Add duplicate keys management for extras #1

Merged
a.fabrizio0a806 merged 6 commits from feature/implement_validators into main 2024-11-29 16:09:42 +01:00
1 changed files with 0 additions and 4 deletions
Showing only changes of commit 543a954125 - Show all commits

View File

@ -224,7 +224,6 @@ class D4Science_ThemePlugin(plugins.SingletonPlugin, toolkit.DefaultDatasetForm)
#log.debug("schema after create prima del validator %s", schema)
schema = remove_check_replicated_custom_key(schema)
#log.debug("create_package1 (remove __before): %s", schema)
#schema.update(self._modify_package_schema(schema))
schema.update(self._modify_package_schema())
#d.package_dict_save = _package_dict_save
#log.debug("create_package2 (remove extras validator): %s", schema)
@ -236,7 +235,6 @@ class D4Science_ThemePlugin(plugins.SingletonPlugin, toolkit.DefaultDatasetForm)
schema = super(D4Science_ThemePlugin, self).update_package_schema()
schema = remove_check_replicated_custom_key(schema)
#log.debug("update_package1 (remove __before) %s", schema)
#schema.update(self._modify_package_schema(schema))
schema.update(self._modify_package_schema())
#log.debug("update_package2 (remove extras validator) %s", schema)
return schema
@ -248,7 +246,6 @@ class D4Science_ThemePlugin(plugins.SingletonPlugin, toolkit.DefaultDatasetForm)
#log.debug("show_package1 %s", schema)
schema = remove_check_replicated_custom_key(schema)
#log.debug("show_package1.5 no before %s", schema)
#schema.update(self._modify_package_schema(schema))
schema.update({
'extras': {
'id': [toolkit.get_validator('ignore')], # Ignora 'id' come prima
@ -256,7 +253,6 @@ class D4Science_ThemePlugin(plugins.SingletonPlugin, toolkit.DefaultDatasetForm)
'value': [toolkit.get_validator('not_missing')]
}
})
#log.debug("show_package2 %s", schema)
return schema
#IDatasetForm