Importing an empty array causes a crash #654

Open
BarryBatser opened this Issue Jan 29, 2014 · 2 comments

2 participants

@BarryBatser

When trying to import a empty array, it causes a crash because it is trying to fetch it later on.

@BarryBatser

In file: NSManagedObject+MagicalDataImport.m, paste this after line 173. It checks if the object is null, but not if its an array, and if, if it is empty.

    if ([relatedObjectData isKindOfClass:[NSArray class]] && ((NSArray*)relatedObjectData).count == 0) {
            continue;
    }
@tonyarnold

Would you mind posting some sample data that demonstrates this problem? I'd love to write up a test for it and fix the issue properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment