Skip to content

Commit

Permalink
Merge pull request #409 from HakaiInstitute/fix-platform-without-plat…
Browse files Browse the repository at this point in the history
…form-vocab

handle datasets with platform without platform_vocabulary
  • Loading branch information
n-a-t-e authored Feb 22, 2024
2 parents 25a936d + 1230c5e commit 60779c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion harvester/cde_harvester/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ def get_platform_code(self):
platform_vocabulary = self.globals.get("platform_vocabulary")

if not (platform and platform_vocabulary):
return None
self.logger.debug(
"Found platform without platform_vocabulary, setting platform to 'unknown'"
)
return "unknown"

if "ioos" in platform_vocabulary:
try:
Expand Down

0 comments on commit 60779c2

Please sign in to comment.