Adds exist DOI validation when creating new DOI for DMP.

This commit is contained in:
gkolokythas 2019-07-05 14:19:43 +03:00
parent 3f93c38d50
commit e36863e132
1 changed files with 2 additions and 0 deletions

View File

@ -977,6 +977,8 @@ public class DataManagementPlanManager {
throw new Exception("User is not authorized to invoke this action");
if (!dmp.getStatus().equals(DMP.DMPStatus.FINALISED.getValue()))
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.
RestTemplate restTemplate = new RestTemplate();