Skip to content

Commit 2f70f59

Browse files
authored
Merge pull request #947 from LoungeBuddy//issues/945
objectWithClassName:dictionary: wasn’t encoding the dictionary into PFOject properly
2 parents 159c0d6 + 91ab36b commit 2f70f59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Parse/PFObject.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,8 +1634,9 @@ + (instancetype)objectWithClassName:(NSString *)className {
16341634

16351635
+ (instancetype)objectWithClassName:(NSString *)className dictionary:(NSDictionary *)dictionary {
16361636
PFObject *object = [self objectWithClassName:className];
1637+
PFDecoder *objectDecoder = [PFDecoder objectDecoder];
16371638
[dictionary enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
1638-
object[key] = obj;
1639+
object[key] = [objectDecoder decodeObject:obj];
16391640
}];
16401641
return object;
16411642
}

0 commit comments

Comments
 (0)