forked from github/szkolny
[API/Librus] Fix getting teacher name in notices. (#151)
This commit is contained in:
parent
18cc60a80b
commit
3d5d3847cc
@ -36,7 +36,7 @@ class LibrusApiNotices(override val data: DataLibrus,
|
|||||||
val id = note.getLong("Id") ?: return@forEach
|
val id = note.getLong("Id") ?: return@forEach
|
||||||
val text = note.getString("Text") ?: ""
|
val text = note.getString("Text") ?: ""
|
||||||
val categoryId = note.getJsonObject("Category")?.getLong("Id") ?: -1
|
val categoryId = note.getJsonObject("Category")?.getLong("Id") ?: -1
|
||||||
val teacherId = note.getJsonObject("AddedBy")?.getLong("Id") ?: -1
|
val teacherId = note.getJsonObject("Teacher")?.getLong("Id") ?: -1
|
||||||
val addedDate = note.getString("Date")?.let { Date.fromY_m_d(it) } ?: return@forEach
|
val addedDate = note.getString("Date")?.let { Date.fromY_m_d(it) } ?: return@forEach
|
||||||
|
|
||||||
val type = when (note.getInt("Positive")) {
|
val type = when (note.getInt("Positive")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user