Skip to content

Commit

Permalink
fix: 출석 조회시 마다 생성되는 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ddingmin committed May 25, 2024
1 parent d8dd3e4 commit d6808b9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# depromeet-makers-be
# depromeet-makers-be
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,19 @@ class GetMemberAttendances(
)
}

val attendances = (1..16).map {
attendanceGateway.save(
val attendances = (1..16).map { week ->
runCatching {
attendanceGateway.findByMemberIdAndGenerationAndWeek(
memberId = member.memberId,
generation = input.generation,
week = week
)
}.getOrDefault(
Attendance.newAttendance(
member = member,
generation = input.generation,
week = it,
sessionType = sessions[it - 1].sessionType,
week = week,
sessionType = sessions[week - 1].sessionType,
)
)
}
Expand Down

0 comments on commit d6808b9

Please sign in to comment.