From 78074af432e6141db43a400696319245ab870f31 Mon Sep 17 00:00:00 2001 From: yuriizhahan Date: Thu, 29 Aug 2024 14:56:20 +0400 Subject: [PATCH] SPCXCFZB-1154 / fix xloader issue in ckan-2.10.* --- ckanext/scheming/plugins.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckanext/scheming/plugins.py b/ckanext/scheming/plugins.py index 0980a684..e413fae2 100644 --- a/ckanext/scheming/plugins.py +++ b/ckanext/scheming/plugins.py @@ -280,11 +280,11 @@ def composite_convert_to(key, data, errors, context): if action_type == 'show': if composite_convert_fields: - for ex in data_dict['extras']: + for ex in data_dict.get('extras', []): if ex['key'] in composite_convert_fields: data_dict[ex['key']] = json.loads(ex['value']) data_dict['extras'] = [ - ex for ex in data_dict['extras'] + ex for ex in data_dict.get('extras', []) if ex['key'] not in composite_convert_fields ] else: