Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/kotlin/common/exception/SnuttException.kt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ object TimetableNotFoundException : SnuttException(ErrorType.TIMETABLE_NOT_FOUND

object PrimaryTimetableNotFoundException : SnuttException(ErrorType.PRIMARY_TIMETABLE_NOT_FOUND)

object TimetableNotPrimaryException : SnuttException(ErrorType.DEFAULT_ERROR)
object TimetableNotPrimaryException : SnuttException(ErrorType.TIMETABLE_NOT_PRIMARY)

object ConfigNotFoundException : SnuttException(ErrorType.CONFIG_NOT_FOUND)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.wafflestudio.snutt.common.exception.InvalidTimetableTitleException
import com.wafflestudio.snutt.common.exception.PrimaryTimetableNotFoundException
import com.wafflestudio.snutt.common.exception.TableDeleteErrorException
import com.wafflestudio.snutt.common.exception.TimetableNotFoundException
import com.wafflestudio.snutt.common.exception.TimetableNotPrimaryException
import com.wafflestudio.snutt.coursebook.data.CoursebookDto
import com.wafflestudio.snutt.coursebook.service.CoursebookService
import com.wafflestudio.snutt.evaluation.service.EvService
Expand Down Expand Up @@ -326,7 +325,7 @@ class TimetableServiceImpl(
timetableId: String,
) {
val table = timetableRepository.findById(timetableId) ?: throw TimetableNotFoundException
if (table.isPrimary != true) throw TimetableNotPrimaryException
if (table.isPrimary != true) return
timetableRepository.save(table.copy(isPrimary = false))
}

Expand Down
Loading