[APIv2/Mobidziennik] Fix incorrect profile ID in teams & timetable.

This commit is contained in:
Kuba Szczodrzyński 2019-11-14 23:46:53 +01:00
parent dbdfc7fdd8
commit 0a3261b8b3
2 changed files with 2 additions and 4 deletions

View File

@ -4,7 +4,6 @@
package pl.szczodrzynski.edziennik.api.v2.mobidziennik.data.api
import pl.szczodrzynski.edziennik.App.profileId
import pl.szczodrzynski.edziennik.api.v2.mobidziennik.DataMobidziennik
import pl.szczodrzynski.edziennik.data.db.modules.teams.Team
import pl.szczodrzynski.edziennik.getById
@ -25,7 +24,7 @@ class MobidziennikApiTeams(val data: DataMobidziennik, tableTeams: List<String>?
val teacherId = cols[4].toLongOrNull() ?: -1
val teamObject = Team(
profileId,
data.profileId,
id,
name,
type,

View File

@ -4,7 +4,6 @@
package pl.szczodrzynski.edziennik.api.v2.mobidziennik.data.api
import pl.szczodrzynski.edziennik.App.profileId
import pl.szczodrzynski.edziennik.api.v2.mobidziennik.DataMobidziennik
import pl.szczodrzynski.edziennik.api.v2.models.DataRemoveModel
import pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata
@ -93,7 +92,7 @@ class MobidziennikApiTimetable(val data: DataMobidziennik, rows: List<String>) {
for (day in dataDays) {
val lessonDate = Date.fromValue(day)
data.lessonNewList += Lesson(profileId, lessonDate.value.toLong()).apply {
data.lessonNewList += Lesson(data.profileId, lessonDate.value.toLong()).apply {
type = Lesson.TYPE_NO_LESSONS
date = lessonDate
}