Fixes bug not setting Creation user on Grant.
This commit is contained in:
parent
3140cf62bd
commit
2d36450e55
|
@ -464,6 +464,9 @@ public class DataManagementPlanManager {
|
|||
}
|
||||
}
|
||||
|
||||
if (newDmp.getGrant().getCreationUser() == null) {
|
||||
newDmp.getGrant().setCreationUser(user);
|
||||
}
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getGrantDao().createOrUpdate(newDmp.getGrant());
|
||||
newDmp = apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().createOrUpdate(newDmp);
|
||||
|
||||
|
|
|
@ -288,9 +288,6 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
|
|||
grant.setStatus(Grant.Status.ACTIVE.getValue());
|
||||
grant.setModified(new Date());
|
||||
grant.setDescription(this.grant.getDescription());
|
||||
UserInfo userInfo = new UserInfo();
|
||||
userInfo.setId(this.users.stream().filter(userInfoListingModel -> ((Integer) userInfoListingModel.getRole()).equals(UserDMP.UserDMPRoles.OWNER.getValue())).findFirst().get().getId());
|
||||
grant.setCreationUser(userInfo);
|
||||
|
||||
dataManagementPlanEntity.setGrant(grant);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue