From 6066213be7b091699c5ae339476cb2f20ca7f443 Mon Sep 17 00:00:00 2001 From: anonymous <anonymous> Date: Wed, 28 Nov 2018 16:33:09 +0100 Subject: [PATCH] fix helpers for spatial_text --- ckanext/odsh/helpers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckanext/odsh/helpers.py b/ckanext/odsh/helpers.py index a41383ed..6c942b7b 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'] -- GitLab