Maybe fix foreign key error during some backup restores

This commit is contained in:
arkon 2023-11-01 22:52:00 -04:00
parent d5e8c38075
commit aca36f9625

View File

@ -298,7 +298,6 @@ class BackupRestorer(
.copyFrom(dbChapter)
.copy(
id = dbChapter.id,
mangaId = manga.id,
bookmark = updatedChapter.bookmark || dbChapter.bookmark,
)
if (dbChapter.read && !updatedChapter.read) {
@ -313,7 +312,7 @@ class BackupRestorer(
}
}
updatedChapter
updatedChapter.copy(mangaId = manga.id)
}
val (existingChapters, newChapters) = processed.partition { it.id > 0 }