diff --git a/src/main/java/com/jangburich/domain/store/service/PrepayService.java b/src/main/java/com/jangburich/domain/store/service/PrepayService.java index c967073..c1fc839 100644 --- a/src/main/java/com/jangburich/domain/store/service/PrepayService.java +++ b/src/main/java/com/jangburich/domain/store/service/PrepayService.java @@ -77,7 +77,7 @@ public Message prepay(String userId, PrepayRequest prepayRequest) { Optional storeAndTeam = storeTeamRepository.findByStoreAndTeam(store, team); if (storeAndTeam.isEmpty()) { - storeTeamRepository.save(buildedStoreTeam); + storeAndTeam = Optional.of(storeTeamRepository.save(buildedStoreTeam)); } StoreTeam storeTeam = storeAndTeam.get();