Skip to content

Commit

Permalink
Use provided context instead of current one
Browse files Browse the repository at this point in the history
  • Loading branch information
3lvis committed Jan 31, 2018
1 parent 21af141 commit 10c45b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Sync/NSManagedObject+Sync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ extension NSManagedObject {
childPredicate = NSPredicate(format: "%K = %@", inverseEntityName, self)

if ((childIDs as Any) as AnyObject).count > 0 {
guard let entity = NSEntityDescription.entity(forEntityName: childEntityName, in: managedObjectContext) else { fatalError() }
guard let entity = NSEntityDescription.entity(forEntityName: childEntityName, in: context) else { fatalError() }
guard let childIDsObject = childIDs as? NSObject else { fatalError() }
childPredicate = NSPredicate(format: "ANY %K IN %@ OR %K = %@", entity.sync_localPrimaryKey(), childIDsObject, inverseEntityName, self)
}
Expand Down

0 comments on commit 10c45b6

Please sign in to comment.