From aca36f962516f04bbbac67c9bf54723a13076c1c Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 1 Nov 2023 22:52:00 -0400 Subject: [PATCH] Maybe fix foreign key error during some backup restores --- .../java/eu/kanade/tachiyomi/data/backup/BackupRestorer.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestorer.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestorer.kt index 753c3ef8e..726f20cd3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestorer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestorer.kt @@ -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 }