Permalink
Browse files

Asserting that an entity has a MOC

  • Loading branch information...
1 parent bc2a670 commit d135e197fbc1791f77f02fe68191022ee063a484 @notjosh notjosh committed Feb 5, 2014
Showing with 1 addition and 0 deletions.
  1. +1 −0 Mantle/MTLManagedObjectAdapter.m
View
1 Mantle/MTLManagedObjectAdapter.m
@@ -132,6 +132,7 @@ - (id)modelFromManagedObject:(NSManagedObject *)managedObject processedObjects:(
NSAssert(entity != nil, @"%@ returned a nil +entity", managedObject);
NSManagedObjectContext *context = managedObject.managedObjectContext;
+ NSAssert(context != nil, @"%@ returned a nil +managedObjectContext", managedObject);
NSDictionary *managedObjectProperties = entity.propertiesByName;
MTLModel *model = [[self.modelClass alloc] init];

0 comments on commit d135e19

Please sign in to comment.