diff --git a/src/main/java/solitour_backend/solitour/user/service/UserService.java b/src/main/java/solitour_backend/solitour/user/service/UserService.java index b370a72..92bcd34 100644 --- a/src/main/java/solitour_backend/solitour/user/service/UserService.java +++ b/src/main/java/solitour_backend/solitour/user/service/UserService.java @@ -92,9 +92,10 @@ public void updateUserInfo(Long userId, UpdateUserInfoRequest request) { private void changeUserProfile(User user, UpdateUserInfoRequest request) { String sex = request.getSex(); - if(sex.equals("male")){ + + if(user.getUserImage().equals(noneProfileUrl) && sex.equals("male")){ user.updateUserImage(maleProfileUrl); - } else if (sex.equals("female")) { + } else if (user.getUserImage().equals(noneProfileUrl) && sex.equals("female")) { user.updateUserImage(femaleProfileUrl); } }