Fix new version url

(cherry picked from commit a0150f8c0f)
This commit is contained in:
George Kalampokis 2023-10-31 16:31:48 +02:00 committed by Diamantis Tziotzios
parent 0548d0b352
commit 0911f52a29
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ public class ZenodoDeposit implements RepositoryDeposit {
logger.debug(objectMapper.writeValueAsString(createResponse));
links = (LinkedHashMap<String, String>) createResponse.get("links");
//Second, make the new version (not in the links?)
String newVersionUrl = links.get("self") + "/actions/newversion" + "?access_token=" + zenodoToken;
String newVersionUrl = links.get("latest_draft") + "/actions/newversion" + "?access_token=" + zenodoToken;
logger.debug("new version url: " + newVersionUrl);
createResponse = restTemplate.postForObject(newVersionUrl, null, Map.class);
logger.debug("createResponse-newVersion:");