Skip to content

Commit

Permalink
Fix checking first attendance api
Browse files Browse the repository at this point in the history
  • Loading branch information
mkSpace committed Aug 6, 2023
1 parent 5d764c1 commit 4a737a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ interface AttendanceRepository : JpaRepository<AttendanceEntity, Long> {
fun findByUserIdAndStudyId(userId: Long, studyId: Long): AttendanceEntity?
fun findAllByStudyIdOrderByAttendanceAtAsc(studyId: Long): List<AttendanceEntity>
fun findAllByStudyIdAndStatus(studyId: Long, status: AttendanceStatus): List<AttendanceEntity>
fun existsByStudyIdAndStatus(studyId: Long, status: AttendanceStatus): Boolean
fun existsByStudyIdAndStatusNot(studyId: Long, status: AttendanceStatus): Boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AttendanceService(
}

fun existFirstAttendanceByStudyId(studyId: Long): Boolean {
return attendanceRepository.existsByStudyIdAndStatus(studyId, AttendanceStatus.ATTENDANCE)
return attendanceRepository.existsByStudyIdAndStatusNot(studyId, AttendanceStatus.UNDECIDED)
}

@Transactional
Expand Down

0 comments on commit 4a737a8

Please sign in to comment.