Chores: remove duplicated code

This commit is contained in:
Paulo Gustavo Veiga 2022-02-16 18:31:41 -08:00
parent 1f99ce3889
commit f16762636b

View File

@ -103,9 +103,7 @@ public class UserManagerImpl
@Override @Override
public User createUser(@NotNull User user, @NotNull Collaborator collaborator) { public User createUser(@NotNull User user, @NotNull Collaborator collaborator) {
user.setPassword(passwordEncoder.encode(user.getPassword())); this.createUser(user);
assert user != null : "Trying to store a null user";
getHibernateTemplate().saveOrUpdate(user);
// Migrate from previous temporal collab to new user ... // Migrate from previous temporal collab to new user ...
final Set<Collaboration> collaborations = collaborator.getCollaborations(); final Set<Collaboration> collaborations = collaborator.getCollaborations();