mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-03 23:58:55 +01:00 
			
		
		
		
	Maybe fix foreign key error during some backup restores
This commit is contained in:
		@@ -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 }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user