1
0

Fix crash on unknown attendance category type (#949)

This commit is contained in:
Mikołaj Pich
2020-09-07 09:35:26 +02:00
committed by GitHub
parent 9f85b2206a
commit c30f105be5
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ private fun calculatePercentage(presence: Double, absence: Double): Double {
}
inline val Attendance.description
get() = when (AttendanceCategory.valueOf(name)) {
get() = when (AttendanceCategory.getCategoryByName(name)) {
AttendanceCategory.PRESENCE -> R.string.attendance_present
AttendanceCategory.ABSENCE_UNEXCUSED -> R.string.attendance_absence_unexcused
AttendanceCategory.ABSENCE_EXCUSED -> R.string.attendance_absence_excused