Permalink
Browse files

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

…termine success
  • Loading branch information...
1 parent 3c24ce1 commit 64a81c6ff3b7c05691c0257210c303665bc6cf4b @casademora casademora committed Oct 24, 2012
@@ -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];
}
}

0 comments on commit 64a81c6

Please sign in to comment.