Skip to content

Commit

Permalink
add assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Oct 24, 2024
1 parent fe33247 commit 1cf0481
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion easyDataverse/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def upload_to_dataverse(
str: The resulting DOI of the dataset, if successful.
"""

api, _ = _initialize_pydataverse(DATAVERSE_URL, API_TOKEN)
assert DATAVERSE_URL is not None, "Please provide the Dataverse URL"

api, _ = _initialize_pydataverse(DATAVERSE_URL.rstrip("/"), API_TOKEN)
ds = Dataset()
ds.from_json(json_data)

Expand Down

0 comments on commit 1cf0481

Please sign in to comment.