Reset default fields of User object before update (#158)
The policies of `User` objects is an empty set by default. So, when using a new `User` object to call `update`, it also updates existing policies to be an empty list.
This commit is contained in:
parent
9f8b5ca4d8
commit
4a269efd4a
|
|
@ -118,6 +118,9 @@ public class ExamplesOrganizationCloner {
|
|||
User userUpdate = new User();
|
||||
userUpdate.setExamplesOrganizationId(newOrganization.getId());
|
||||
userUpdate.setPasswordResetInitiated(user.getPasswordResetInitiated());
|
||||
userUpdate.setSource(user.getSource());
|
||||
userUpdate.setGroupIds(null);
|
||||
userUpdate.setPolicies(null);
|
||||
return Mono
|
||||
.when(
|
||||
userService.update(user.getId(), userUpdate),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user