Skip to content

Commit 914c188

Browse files
authored
Merge pull request #74 from Dugout-Developers/fix/#68
[FIX] 임시 저장 로직 수정
2 parents 0cf4a32 + 8efb531 commit 914c188

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/back/catchmate/domain/game/converter/GameConverter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ public Game toEntity(Club homeClub, Club awayClub, CreateGameRequest createGameR
1515
return Game.builder()
1616
.homeClub(homeClub)
1717
.awayClub(awayClub)
18-
.gameStartDate(LocalDateTime.parse(createGameRequest.getGameStartDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))
18+
.gameStartDate(createGameRequest.getGameStartDate() != null
19+
? LocalDateTime.parse(createGameRequest.getGameStartDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
20+
: null)
1921
.location(createGameRequest.getLocation())
2022
.build();
2123
}

0 commit comments

Comments
 (0)