[#8] resource-type not always present

This commit is contained in:
amercader 2013-03-14 14:30:16 +00:00
parent a76a8d2ca7
commit d2723c3020
1 changed files with 5 additions and 1 deletions

View File

@ -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', '')