Skip to content

Commit

Permalink
Merge pull request #124 from mash-up-kr/feature/fix_first_attendance
Browse files Browse the repository at this point in the history
Fix checking first attendance api
  • Loading branch information
mkSpace authored Aug 10, 2023
2 parents 3820633 + 4a737a8 commit 046003f
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 046003f

Please sign in to comment.