Skip to content

Commit 9f9665e

Browse files
committed
- fixed issue with non existing key
1 parent fa79e6c commit 9f9665e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygeoapi/openapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ def get_post_resource(res):
725725
newres[newkey] = res[list(res.keys())[0]]
726726

727727
# remove temporal extent to prevent type conversion issues
728-
if 'temporal' in newres[newkey]['extents'].keys():
728+
if 'extents' in newres[newkey].keys() and 'temporal' in newres[newkey]['extents'].keys(): # noqa
729729
del newres[newkey]['extents']['temporal']
730730

731731
return newres

0 commit comments

Comments
 (0)