Maybe fix foreign key error during some backup restores
This commit is contained in:
parent
d5e8c38075
commit
aca36f9625
@ -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 New Issue
Block a user