Fix(MongoTransform): Ignore Audience legacy fields (#4018)

This commit is contained in:
Antonio Davi Macedo Coelho de Castro
2017-09-09 10:27:54 -07:00
committed by Florent Vilmart
parent 121d151af9
commit 019f9e55e1
2 changed files with 40 additions and 0 deletions

View File

@@ -924,6 +924,10 @@ const mongoObjectToParseObject = (className, mongoObject, schema) => {
restObject['expiresAt'] = Parse._encode(new Date(mongoObject[key]));
break;
default:
if (className === '_Audience' && (key === '_last_used' || key === 'times_used')) {
// Ignore these parse.com legacy fields
break;
}
// Check other auth data keys
var authDataMatch = key.match(/^_auth_data_([a-zA-Z0-9_]+)$/);
if (authDataMatch) {