[API/Librus] Fix null in homework description.

This commit is contained in:
Kacper Ziubryniewicz 2020-01-01 18:58:29 +01:00
parent 5265f3eb6a
commit 4950627850

View File

@ -25,12 +25,8 @@ class LibrusSynergiaHomework(override val data: DataLibrus, val onSuccess: () ->
init { init {
synergiaGet(TAG, "moje_zadania", method = POST, parameters = mapOf( synergiaGet(TAG, "moje_zadania", method = POST, parameters = mapOf(
"dataOd" to "dataOd" to Date.getToday().stringY_m_d,
if (data.profile?.empty != false) "dataDo" to Date.getToday().stepForward(0, 0, 7).stringY_m_d,
profile!!.getSemesterStart(1).stringY_m_d
else
Date.getToday().stringY_m_d,
"dataDo" to profile!!.getSemesterEnd(profile?.currentSemester ?: 2).stringY_m_d,
"przedmiot" to -1 "przedmiot" to -1
)) { text -> )) { text ->