Skip to content

Commit

Permalink
YDA-5992: fix encoding for DataCite payload
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Nov 28, 2024
1 parent ee1fb91 commit 6f57454
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions datacite.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def metadata_post(ctx, payload):

response = requests.post(url,
auth=auth,
data=payload,
data=payload.encode(),
headers=headers,
timeout=30,
verify=config.datacite_tls_verify)
Expand All @@ -35,7 +35,7 @@ def metadata_put(ctx, doi, payload):

response = requests.put(url,
auth=auth,
data=payload,
data=payload.encode(),
headers=headers,
timeout=30,
verify=config.datacite_tls_verify)
Expand Down
2 changes: 1 addition & 1 deletion publication.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ def set_access_restrictions(ctx, vault_package, publication_state):
"""
# Embargo handling
combiJsonPath = publication_state["combiJsonPath"]
dictJsonData = jsonutil.read(ctx, combiJsonPath, want_bytes=False)
dictJsonData = jsonutil.read(ctx, combiJsonPath)

# Remove empty objects to prevent empty fields on landingpage.
dictJsonData = misc.remove_empty_objects(dictJsonData)
Expand Down

0 comments on commit 6f57454

Please sign in to comment.