mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 07:37:48 +01:00
Maybe fix foreign key error during some backup restores
This commit is contained in:
parent
d5e8c38075
commit
aca36f9625
1 changed files with 1 additions and 2 deletions
|
@ -298,7 +298,6 @@ class BackupRestorer(
|
||||||
.copyFrom(dbChapter)
|
.copyFrom(dbChapter)
|
||||||
.copy(
|
.copy(
|
||||||
id = dbChapter.id,
|
id = dbChapter.id,
|
||||||
mangaId = manga.id,
|
|
||||||
bookmark = updatedChapter.bookmark || dbChapter.bookmark,
|
bookmark = updatedChapter.bookmark || dbChapter.bookmark,
|
||||||
)
|
)
|
||||||
if (dbChapter.read && !updatedChapter.read) {
|
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 }
|
val (existingChapters, newChapters) = processed.partition { it.id > 0 }
|
||||||
|
|
Loading…
Reference in a new issue