Fix hybrid login if student graduated

This commit is contained in:
Mikołaj Pich 2019-09-10 20:42:42 +02:00
parent ddeb8560cf
commit 46fff8a3a7
No known key found for this signature in database
GPG key ID: F62B26E36D4C4BAA

View file

@ -234,7 +234,14 @@ class Sdk {
getApiStudents(it.token, it.pin, it.symbol)
}.map { apiStudents ->
apiStudents.map { apiStudent ->
apiStudent.copy(loginMode = Mode.HYBRID, scrapperHost = scrapperHost)
apiStudent.copy(
loginMode = Mode.HYBRID,
scrapperHost = scrapperHost,
// used if student graduated
classId = it.classId,
className = it.className
)
}
}
}.toList().map { it.flatten() }