Commit 165643cb by houweibin

1,fix error

parent f4be3b7b
...@@ -150,7 +150,13 @@ static NSString * const BUYCollectionsKey = @"collection_listings"; ...@@ -150,7 +150,13 @@ static NSString * const BUYCollectionsKey = @"collection_listings";
return [self getRequestForURL:url completionHandler:^(NSDictionary *json, NSHTTPURLResponse *response, NSError *error) { return [self getRequestForURL:url completionHandler:^(NSDictionary *json, NSHTTPURLResponse *response, NSError *error) {
BUYCollection *collection = nil; BUYCollection *collection = nil;
if (json && !error) { if (json && !error) {
collection = [self.modelManager buy_objectWithEntityName:[BUYCollection entityName] JSONDictionary:json[BUYCollectionsKey][0]]; // collection = [self.modelManager buy_objectWithEntityName:[BUYCollection entityName] JSONDictionary:json[BUYCollectionsKey][0]];
NSArray *dataArray = json[BUYCollectionsKey];
if(dataArray!=nil && dataArray.count>0){
collection = [self.modelManager buy_objectWithEntityName:[BUYCollection entityName] JSONDictionary:json[BUYCollectionsKey][0]];
}
} }
block(collection, error); block(collection, error);
}]; }];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment