diff --git a/src/main/java/edu/harvard/iq/dataverse/pidproviders/doi/fake/FakeDOIProvider.java b/src/main/java/edu/harvard/iq/dataverse/pidproviders/doi/fake/FakeDOIProvider.java index a967fb40620..023b766f2ac 100644 --- a/src/main/java/edu/harvard/iq/dataverse/pidproviders/doi/fake/FakeDOIProvider.java +++ b/src/main/java/edu/harvard/iq/dataverse/pidproviders/doi/fake/FakeDOIProvider.java @@ -44,8 +44,11 @@ public List getProviderInformation() { } @Override - public String createIdentifier(DvObject dvo) throws Throwable { - return "fakeIdentifier"; + public String createIdentifier(DvObject dvObject) throws Throwable { + if(dvObject.getIdentifier() == null || dvObject.getIdentifier().isEmpty() ){ + dvObject = generatePid(dvObject); + } + return dvObject.getIdentifier(); } @Override