Skip to content

Commit

Permalink
fix - #175 userRecentLockDate가 null일 때 NPE를 방지하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kseysh committed Jul 18, 2024
1 parent 11153db commit a67b097
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ public IsLockTodayResponse checkIsTodayLockDeprecated(Long userId, LocalDate loc

@Transactional(readOnly = true)
public IsLockTodayResponse checkIsTodayLock(Long userId, String timeZone) {
LocalDate now = LocalDate.now(ZoneId.of(timeZone));
LocalDate userRecentLockDate = this.findByIdOrThrowException(userId).getRecentLockDate();
return new IsLockTodayResponse(userRecentLockDate.equals(LocalDate.now(ZoneId.of(timeZone))));
return new IsLockTodayResponse(now.equals(userRecentLockDate));
}

public void withdrawImmediately(Long userId) {
Expand Down

0 comments on commit a67b097

Please sign in to comment.