Adds exist DOI validation when creating new DOI for DMP.
This commit is contained in:
parent
3f93c38d50
commit
e36863e132
|
@ -977,6 +977,8 @@ public class DataManagementPlanManager {
|
||||||
throw new Exception("User is not authorized to invoke this action");
|
throw new Exception("User is not authorized to invoke this action");
|
||||||
if (!dmp.getStatus().equals(DMP.DMPStatus.FINALISED.getValue()))
|
if (!dmp.getStatus().equals(DMP.DMPStatus.FINALISED.getValue()))
|
||||||
throw new Exception("DMP is not finalized");
|
throw new Exception("DMP is not finalized");
|
||||||
|
if (!dmp.getDoi().trim().isEmpty())
|
||||||
|
throw new Exception("DMP already has a DOI");
|
||||||
|
|
||||||
// First step, post call to Zenodo, to create the entry.
|
// First step, post call to Zenodo, to create the entry.
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
RestTemplate restTemplate = new RestTemplate();
|
||||||
|
|
Loading…
Reference in New Issue