Skip to content

Commit

Permalink
- updated formatting of conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
doublebyte1 committed Nov 21, 2024
1 parent 691a900 commit e8acb18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pygeoapi/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ def remove_timestamps(cfg: dict) -> dict:

for key in cfg['resources'].keys():
extents = cfg['resources'][key].get('extents')
if extents is not None and 'temporal' in extents.keys():
if (extents is not None and 'temporal' in extents.keys()):
del extents['temporal']

return cfg
Expand Down Expand Up @@ -751,7 +751,7 @@ def get_post_resource(cfg: dict) -> dict:

collection = gen_collection_name()

if len(cfg['resources']) < 1 or cfg['resources']['obs'] is None:
if (len(cfg['resources']) < 1 or cfg['resources'].get('obs') is None):
return ''

post = {collection: {}}
Expand All @@ -775,7 +775,7 @@ def get_put_resource(cfg: dict) -> dict:
:returns: dict of OpenAPI definition
"""

if len(cfg['resources']) < 1 or cfg['resources']['obs'] is None:
if (len(cfg['resources']) < 1 or cfg['resources']['obs'] is None):
return ''

put = deepcopy(cfg['resources']['obs'])
Expand All @@ -798,7 +798,7 @@ def get_patch_resource(cfg: dict) -> dict:
:returns: dict of OpenAPI definition
"""

if len(cfg['resources']) < 1 or cfg['resources']['obs'] is None:
if (len(cfg['resources']) < 1 or cfg['resources']['obs'] is None):
return ''

patch = deepcopy(cfg['resources']['obs'])
Expand Down

0 comments on commit e8acb18

Please sign in to comment.