From fad7442ffca01e449d6a17364c1dcbb9b4e1a3ad Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 17 Feb 2022 17:36:46 -0800 Subject: [PATCH] Clean up code --- .../src/main/java/com/wisemapping/dao/UserManagerImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java index 109ae75e..47107441 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java @@ -125,9 +125,8 @@ public class UserManagerImpl template.delete(collaborator); // Save all new... - user.setPassword(passwordEncoder.encode(user.getPassword())); - template.save(user); - newCollabs.forEach(c -> template.save(c)); + this.createUser(user); + newCollabs.forEach(c -> template.saveOrUpdate(c)); return user; }