diff --git a/src/main/java/com/depromeet/stonebed/domain/missionRecord/application/MissionRecordService.java b/src/main/java/com/depromeet/stonebed/domain/missionRecord/application/MissionRecordService.java index 486aa40a..aac21585 100644 --- a/src/main/java/com/depromeet/stonebed/domain/missionRecord/application/MissionRecordService.java +++ b/src/main/java/com/depromeet/stonebed/domain/missionRecord/application/MissionRecordService.java @@ -85,7 +85,9 @@ public void saveMission(Long missionId, String content) { findMissionHistoryByIdAndRaisePet(missionId, mission.getRaisePet()); MissionRecord missionRecord = - MissionRecord.createMissionRecord(content, member, missionHistory); + missionRecordRepository + .findByMemberAndMissionHistory(member, missionHistory) + .orElseThrow(() -> new CustomException(ErrorCode.MISSION_RECORD_NOT_FOUND)); missionRecord.updateContent(content);