From 9140e1d62145d6f3646ce6737439323879e657b4 Mon Sep 17 00:00:00 2001 From: Neda Taherifar Date: Tue, 20 Aug 2024 13:48:31 +0800 Subject: [PATCH] Fix batch upload issue with missing values, initializing 'parent' field --- .../ckanext-igsn-theme/ckanext/igsn_theme/logic/batch_process.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/logic/batch_process.py b/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/logic/batch_process.py index fca3d04e..c77fcc70 100644 --- a/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/logic/batch_process.py +++ b/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/logic/batch_process.py @@ -75,6 +75,7 @@ def prepare_samples_data(samples_df, authors_df, related_resources_df, funding_d sample['notes'] = sample['description'] sample['location_choice'] = 'noLocation' sample['parent_sample'] = sample['parent_sample'] + sample['parent'] = '' org = toolkit.get_action('organization_show')({}, {'id': org_id}) sample['owner_org'] = org_id