fix(sql): Union issue

It doesn't like history.*
This commit is contained in:
Ahmad Ansori Palembani 2024-08-27 09:50:32 +07:00
parent 3199f07363
commit 6e3eaad481
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 24 additions and 16 deletions

View file

@ -84,7 +84,7 @@ data class MangaChapterHistory(val manga: Manga, val chapter: Chapter, val histo
mangaId = _mangaId!!,
url = chapterUrl!!,
name = name!!,
scanlator = scanlator!!,
scanlator = scanlator,
read = read!!,
bookmark = bookmark!!,
lastPageRead = lastPageRead!!,
@ -98,11 +98,12 @@ data class MangaChapterHistory(val manga: Manga, val chapter: Chapter, val histo
historyId?.let {
History.mapper(
id = historyId,
chapterId = historyChapterId!!,
chapterId = historyChapterId ?: chapterId ?: 0L,
lastRead = historyLastRead,
timeRead = historyTimeRead,
)
} ?: History.create().apply {
(historyChapterId ?: chapterId)?.let { chapter_id = it }
historyLastRead?.let { last_read = it }
historyTimeRead?.let { time_read = it }
},