diff --git a/ckanext/odsh/helpers.py b/ckanext/odsh/helpers.py index a41383ed4ea02c685ebcaeabc721a7bb2040ed28..6c942b7b9aef750303d9c0c3de8864641e689a6a 100644 --- a/ckanext/odsh/helpers.py +++ b/ckanext/odsh/helpers.py @@ -82,6 +82,8 @@ def compute_bounding_box(coords): def odsh_get_spatial_text(pkg_dict): extras=pkg_dict.get('extras') spatial=None + if extras is None: + return None for f in extras: if 'key' in f and f['key'] == 'spatial_text': spatial=f['value']