From 092c68714b1d9505565d297f7e7db67379c6c5d6 Mon Sep 17 00:00:00 2001 From: Maicol Battistini Date: Tue, 20 Aug 2024 17:20:31 +0200 Subject: [PATCH] fix: Custom dataset fields won't be saved --- .../ckanext-d4science_theme/ckanext/d4science_theme/plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compose/2.10/src/ckanext-d4science_theme/ckanext/d4science_theme/plugin.py b/compose/2.10/src/ckanext-d4science_theme/ckanext/d4science_theme/plugin.py index 5143a72..be3f1b5 100644 --- a/compose/2.10/src/ckanext-d4science_theme/ckanext/d4science_theme/plugin.py +++ b/compose/2.10/src/ckanext-d4science_theme/ckanext/d4science_theme/plugin.py @@ -40,6 +40,7 @@ def remove_check_replicated_custom_key(schema): return schema #CREATED BY FRANCESCO MANGIACRAPA FOR OVERRIDING THE package_extras_save FROM dictization.model_save.py +# Is this needed? def _package_extras_save(extra_dicts, obj, context): ''' It can save repeated extras as key-value ''' allow_partial_update = context.get("allow_partial_update", False) @@ -321,7 +322,8 @@ class D4Science_ThemePlugin(plugins.SingletonPlugin, toolkit.DefaultDatasetForm) } #Overriding package_extras_save method - model_save.package_extras_save = _package_extras_save + # Is this needed? + # model_save.package_extras_save = _package_extras_save #Overriding index home controller - rimosso in ckan 2.10 #d4sHC = d4SHomeController()