Skip to content

Commit

Permalink
cut/pasted to the wrong place
Browse files Browse the repository at this point in the history
  • Loading branch information
qqmyers committed Jul 27, 2021
1 parent d549f72 commit 93481bd
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
Original file line number Diff line number Diff line change
Expand Up @@ -1241,16 +1241,15 @@ public Response publishMigratedDataset(String jsonldBody, @PathParam("id") Strin
ds.getLatestVersion().setVersionNumber(Long.valueOf(ds.getVersionNumber() + 1));
ds.getLatestVersion().setMinorVersionNumber(Long.valueOf(0));
}
if(ds.getLatestVersion().getVersionNumber()==1 && ds.getLatestVersion().getMinorVersionNumber()==0) {
//Also set publication date if this is the first
if(dateTime != null) {
ds.setPublicationDate(Timestamp.valueOf(dateTime));
}
// Release User is only set in FinalizeDatasetPublicationCommand if the pub date
// is null, so set it here.
ds.setReleaseUser((AuthenticatedUser) user);
}
if(ds.getLatestVersion().getVersionNumber()==1 && ds.getLatestVersion().getMinorVersionNumber()==0) {
//Also set publication date if this is the first
if(dateTime != null) {
ds.setPublicationDate(Timestamp.valueOf(dateTime));
}

// Release User is only set in FinalizeDatasetPublicationCommand if the pub date
// is null, so set it here.
ds.setReleaseUser((AuthenticatedUser) user);
}
} catch (Exception e) {
logger.fine(e.getMessage());
Expand Down

0 comments on commit 93481bd

Please sign in to comment.