RLH-21 - Fix Sonar
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
211aa26df1
commit
c51486751f
@ -38,7 +38,9 @@ public class UserServiceImpl implements UserService
|
|||||||
if (userRepository.findById(id).isEmpty()) {
|
if (userRepository.findById(id).isEmpty()) {
|
||||||
throw new UsernameNotFoundException(id.toString());
|
throw new UsernameNotFoundException(id.toString());
|
||||||
}
|
}
|
||||||
|
if (userRepository.findById(id).isPresent()) {
|
||||||
userRepository.delete(userRepository.findById(id).get());
|
userRepository.delete(userRepository.findById(id).get());
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user