Skip to content

Commit

Permalink
Avoid dealing with missing metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrelsford committed Dec 19, 2024
1 parent d2ecf7f commit b8f703a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ckanext-natcap/ckanext/natcap/update_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ def update_dataset(user, dataset, resources):
return

metadata = get_dataset_metadata(resources)

if not metadata:
LOGGER.info(f"Skipping update of dataset {dataset['id']}, no metadata found")
return

extras = update_sources(dataset, resources, metadata, extras)
extras = update_mappreview(dataset, metadata, extras)
extras = update_last_updated(extras)
Expand Down

0 comments on commit b8f703a

Please sign in to comment.