diff --git a/ckanext/spatial/harvesters/base.py b/ckanext/spatial/harvesters/base.py index 9b6cf9f..7f2ddb9 100644 --- a/ckanext/spatial/harvesters/base.py +++ b/ckanext/spatial/harvesters/base.py @@ -236,7 +236,11 @@ class SpatialHarvester(HarvesterBase): ]: extras[name] = iso_values[name] - extras['resource-type'] = iso_values['resource-type'][0] + + if len(iso_values.get('resource-type', [])): + extras['resource-type'] = iso_values['resource-type'][0] + else: + extras['resource-type'] = '' extras['licence'] = iso_values.get('use-constraints', '')