Merge pull request #476 from sdf611097/master

ExportAdapter destroy nothing will cause change password failed
This commit is contained in:
Fosco Marotto
2016-02-18 10:44:36 -08:00

View File

@@ -306,7 +306,8 @@ ExportAdapter.prototype.destroy = function(className, query, options = {}) {
return coll.remove(mongoWhere);
}).then((resp) => {
if (resp.result.n === 0) {
//Check _Session to avoid changing password failed without any session.
if (resp.result.n === 0 && className !== "_Session") {
return Promise.reject(
new Parse.Error(Parse.Error.OBJECT_NOT_FOUND,
'Object not found.'));