Skip to content

Commit

Permalink
배치에서 lecture 복사 안함 (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
asp345 authored Jan 30, 2025
1 parent fd7b104 commit 6431fdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ class SugangSnuSyncServiceImpl(
val newLectures =
sugangSnuFetchService.getSugangSnuLectures(coursebook.year, coursebook.semester)
.map { lecture ->
if (courseNumberCategoryPre2025Map[lecture.courseNumber] == null || lecture.year < 2025) {
return@map lecture
lecture.apply {
categoryPre2025 = courseNumberCategoryPre2025Map[lecture.courseNumber]
}
lecture.copy(categoryPre2025 = courseNumberCategoryPre2025Map[lecture.courseNumber])
}
val oldLectures =
lectureService.getLecturesByYearAndSemesterAsFlow(coursebook.year, coursebook.semester).toList()
Expand All @@ -85,10 +84,9 @@ class SugangSnuSyncServiceImpl(
val newLectures =
sugangSnuFetchService.getSugangSnuLectures(coursebook.year, coursebook.semester)
.map { lecture ->
if (courseNumberCategoryPre2025Map[lecture.courseNumber] == null || lecture.year < 2025) {
return@map lecture
lecture.apply {
categoryPre2025 = courseNumberCategoryPre2025Map[lecture.courseNumber]
}
lecture.copy(categoryPre2025 = courseNumberCategoryPre2025Map[lecture.courseNumber])
}
lectureService.upsertLectures(newLectures)
syncTagList(coursebook, newLectures)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/kotlin/lectures/data/Lecture.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ data class Lecture(
var registrationCount: Int = 0,
var wasFull: Boolean = false,
val evInfo: EvInfo? = null,
val categoryPre2025: String?,
var categoryPre2025: String?,
) {
infix fun equalsMetadata(other: Lecture): Boolean {
return this === other ||
Expand Down

0 comments on commit 6431fdf

Please sign in to comment.