Fix updates merging changes into wrong coredata context

This commit is contained in:
Shadowfacts 2022-01-19 17:40:42 -05:00
parent 53d4b0bae8
commit c89df7604b
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class PersistentContainer: NSPersistentContainer {
if let deleteResult = result as? NSBatchDeleteResult,
let objectIDs = deleteResult.result as? [NSManagedObjectID] {
NSManagedObjectContext.mergeChanges(fromRemoteContextSave: [NSDeletedObjectsKey: objectIDs], into: [self.backgroundContext])
NSManagedObjectContext.mergeChanges(fromRemoteContextSave: [NSDeletedObjectsKey: objectIDs], into: [self.viewContext])
// todo: does the background/view contexts need to get saved then?
}