Fix updates merging changes into wrong coredata context
This commit is contained in:
parent
53d4b0bae8
commit
c89df7604b
|
@ -110,7 +110,7 @@ class PersistentContainer: NSPersistentContainer {
|
||||||
|
|
||||||
if let deleteResult = result as? NSBatchDeleteResult,
|
if let deleteResult = result as? NSBatchDeleteResult,
|
||||||
let objectIDs = deleteResult.result as? [NSManagedObjectID] {
|
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?
|
// todo: does the background/view contexts need to get saved then?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue