diff --git a/SpringApp/library/src/main/java/com/ip/library/users/service/UserService.java b/SpringApp/library/src/main/java/com/ip/library/users/service/UserService.java index b75c609..1629e26 100644 --- a/SpringApp/library/src/main/java/com/ip/library/users/service/UserService.java +++ b/SpringApp/library/src/main/java/com/ip/library/users/service/UserService.java @@ -32,10 +32,8 @@ public class UserService { } public UserEntity create(UserEntity entity) { - if (entity.getRole() == null || !entity.getRole().equals("user")) { - entity.setRole("user"); - } - entity.setBooks(new ArrayList()); + entity.setRole("user"); + entity.setBooks(new ArrayList<>()); return repository.create(entity); }