Fixes setting the status of a new version of a published DMP to "published" too.
This commit is contained in:
parent
eba3ee137d
commit
1c58007a9f
|
@ -584,11 +584,6 @@ public class DataManagementPlanManager {
|
|||
|
||||
if (latestVersionDMP.get(0).getVersion().equals(oldDmp.getVersion())) {
|
||||
DMP newDmp = dataManagementPlan.toDataModel();
|
||||
if (oldDmp.isPublic()) {
|
||||
newDmp.setPublic(true);
|
||||
newDmp.setFinalizedAt(new Date());
|
||||
newDmp.setPublishedAt(new Date());
|
||||
}
|
||||
UserInfo user = apiContext.getOperationsContext().getBuilderFactory().getBuilder(UserInfoBuilder.class).id(principal.getId()).build();
|
||||
createOrganisationsIfTheyDontExist(newDmp, databaseRepository.getOrganisationDao());
|
||||
createResearchersIfTheyDontExist(newDmp, databaseRepository.getResearcherDao(), user);
|
||||
|
|
Loading…
Reference in New Issue