* Fix #5654

* fix tests

* throw error instead
This commit is contained in:
Diamond Lewis
2019-06-11 13:40:34 -05:00
committed by GitHub
parent a58653ada8
commit 7a080478b5
3 changed files with 43 additions and 0 deletions

View File

@@ -52,6 +52,12 @@ function RestWrite(
'objectId is an invalid field name.'
);
}
if (!query && data.id) {
throw new Parse.Error(
Parse.Error.INVALID_KEY_NAME,
'id is an invalid field name.'
);
}
// When the operation is complete, this.response may have several
// fields.