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: