Skip to content

Commit

Permalink
explicitly use replace
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Jun 12, 2024
1 parent ee107a5 commit 07ffcfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion easyDataverse/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def _update_metadata(
if replace:
EDIT_ENDPOINT = f"{base_url.rstrip('/')}/api/datasets/:persistentId/editMetadata?persistentId={p_id}&replace=true"
else:
EDIT_ENDPOINT = f"{base_url.rstrip('/')}/api/datasets/:persistentId/editMetadata?persistentId={p_id}"
EDIT_ENDPOINT = f"{base_url.rstrip('/')}/api/datasets/:persistentId/editMetadata?persistentId={p_id}&replace=false"

headers = {"X-Dataverse-key": api_token}
response = requests.put(EDIT_ENDPOINT, headers=headers, json=to_change)
Expand Down

0 comments on commit 07ffcfc

Please sign in to comment.