Fixes bug on DOI creation not saving the value on respected DMP.

This commit is contained in:
gkolokythas 2019-07-05 14:21:33 +03:00
parent e36863e132
commit de56a1acc4
1 changed files with 2 additions and 0 deletions

View File

@ -1020,6 +1020,8 @@ public class DataManagementPlanManager {
String publishUrl = links.get("publish") + "?access_token=" + this.environment.getProperty("zenodo.access_token");
Map<String, Object> publishResponce = restTemplate.postForObject(publishUrl, "", Map.class);
dmp.setDoi((String) publishResponce.get("conceptdoi"));
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().createOrUpdate(dmp);
return (String) publishResponce.get("conceptdoi");
}
}