Break object deletions's dependency on schemaController

This commit is contained in:
Drew Gross
2016-04-26 10:23:14 -07:00
parent d4bd21fcbc
commit 449ca115b1
2 changed files with 4 additions and 10 deletions

View File

@@ -337,13 +337,7 @@ DatabaseController.prototype.destroy = function(className, query, { acl } = {})
}
throw error;
})
.then(parseFormatSchema => this.adapter.deleteObjectsByQuery(
className,
query,
schemaController,
!this.skipValidation,
parseFormatSchema
))
.then(parseFormatSchema => this.adapter.deleteObjectsByQuery(className, query, !this.skipValidation, parseFormatSchema))
.catch(error => {
// When deleting sessions while changing passwords, don't throw an error if they don't have any sessions.
if (className === "_Session" && error.code === Parse.Error.OBJECT_NOT_FOUND) {