forked from github/szkolny
[APIv2/Librus] Fix attendance metadata
This commit is contained in:
parent
42b56fa4a2
commit
70d35e12e5
@ -66,14 +66,16 @@ class LibrusApiAttendances(override val data: DataLibrus,
|
||||
val addedDate = Date.fromIso(attendance.getString("AddDate") ?: return@forEach)
|
||||
|
||||
data.attendanceList.add(attendanceObject)
|
||||
data.metadataList.add(Metadata(
|
||||
profileId,
|
||||
Metadata.TYPE_ATTENDANCE,
|
||||
id,
|
||||
profile?.empty ?: false,
|
||||
profile?.empty ?: false,
|
||||
addedDate
|
||||
))
|
||||
if(type != Attendance.TYPE_PRESENT) {
|
||||
data.metadataList.add(Metadata(
|
||||
profileId,
|
||||
Metadata.TYPE_ATTENDANCE,
|
||||
id,
|
||||
profile?.empty ?: false,
|
||||
profile?.empty ?: false,
|
||||
addedDate
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
data.setSyncNext(ENDPOINT_LIBRUS_API_ATTENDANCES, SYNC_ALWAYS)
|
||||
|
Loading…
Reference in New Issue
Block a user