Allow to re insert users on Dataset profile
This commit is contained in:
parent
008b6321ea
commit
9da0f4e776
|
@ -289,6 +289,10 @@ public class DatasetProfileManager {
|
|||
userDatasetProfile1.setRole(1);
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getUserDatasetProfileDao().createOrUpdate(userDatasetProfile1);
|
||||
});
|
||||
entity.getUsers().stream().filter(userDatasetProfile -> model.getUsers().stream().filter(userInfoListingModel -> userDatasetProfile.getUser().getId().equals(userInfoListingModel.getId())).count() > 0 && userDatasetProfile.getRole() == 2).forEach(userDatasetProfile -> {
|
||||
userDatasetProfile.setRole(1);
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getUserDatasetProfileDao().createOrUpdate(userDatasetProfile);
|
||||
});
|
||||
}
|
||||
if (entity.getUsers() != null && !entity.getUsers().isEmpty()) {
|
||||
entity.getUsers().stream().filter(userDatasetProfile -> model.getUsers().stream().filter(userInfoListingModel -> userDatasetProfile.getUser().getId().equals(userInfoListingModel.getId())).count() == 0).forEach(userDatasetProfile -> {
|
||||
|
|
Loading…
Reference in New Issue