Skip to content
Snippets Groups Projects
Commit c7ceff5d authored by anonymous's avatar anonymous
Browse files

Allow for a spatial polygon without spatial_URI

parent 0d38561a
No related branches found
No related tags found
No related merge requests found
...@@ -135,7 +135,12 @@ def known_spatial_uri(key, data, errors, context): ...@@ -135,7 +135,12 @@ def known_spatial_uri(key, data, errors, context):
value = _extract_value(data, 'spatial_uri') value = _extract_value(data, 'spatial_uri')
if not value: if not value:
# some harvesters might import a polygon directly...
poly = _extract_value(data, 'spatial')
if not poly:
raise toolkit.Invalid('spatial_uri:odsh_spatial_uri_error_label') raise toolkit.Invalid('spatial_uri:odsh_spatial_uri_error_label')
else:
return
mapping_file = config.get('ckanext.odsh.spatial.mapping') mapping_file = config.get('ckanext.odsh.spatial.mapping')
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment