aboutsummaryrefslogtreecommitdiffstats
path: root/python/sandcrawler/fileset_platforms.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/sandcrawler/fileset_platforms.py')
-rw-r--r--python/sandcrawler/fileset_platforms.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/sandcrawler/fileset_platforms.py b/python/sandcrawler/fileset_platforms.py
index 81aad87..4adc9b7 100644
--- a/python/sandcrawler/fileset_platforms.py
+++ b/python/sandcrawler/fileset_platforms.py
@@ -205,6 +205,8 @@ class DataverseHelper(FilesetPlatformHelper):
)
resp.raise_for_status()
obj = resp.json()
+ if not "latestVersion" in obj["data"]:
+ raise PlatformScopeError("could not find latest version for dataverse record")
obj_latest = obj["data"]["latestVersion"]
dataset_version = (
f"{obj_latest['versionNumber']}.{obj_latest['versionMinorNumber']}"