Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't check the error, rely only on the return value of methods to de…

…termine success
  • Loading branch information...
commit 64a81c6ff3b7c05691c0257210c303665bc6cf4b 1 parent 3c24ce1
@casademora casademora authored
5 MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalRecord.m
@@ -196,8 +196,9 @@ - (void) MR_contextWillSave:(NSNotification *)notification
MRLog(@"Context %@ is about to save. Obtaining permanent IDs for new %lu inserted objects", [context MR_description], (unsigned long)[insertedObjects count]);
NSError *error = nil;
- BOOL success = [context obtainPermanentIDsForObjects:insertedObjects error:&error];
- if (!success && error) {
+ BOOL success = [context obtainPermanentIDsForObjects:[insertedObjects allObjects] error:&error];
+ if (!success)
+ {
[MagicalRecord handleErrors:error];
Please sign in to comment.
Something went wrong with that request. Please try again.