Adds fix for issue affecting update with CLP (#5269)

* Adds fix for issue affecting update with CLP

* Disable single instance
This commit is contained in:
Florent Vilmart
2019-01-04 14:23:27 -05:00
committed by GitHub
parent 9f2fc88f0f
commit 46ac7e7f11
6 changed files with 22 additions and 23 deletions

View File

@@ -112,7 +112,6 @@ function del(config, auth, className, objectId) {
const hasLiveQuery = checkLiveQuery(className, config);
if (hasTriggers || hasLiveQuery || className == '_Session') {
return new RestQuery(config, auth, className, { objectId })
.forWrite()
.execute({ op: 'delete' })
.then(response => {
if (response && response.results && response.results.length) {
@@ -224,9 +223,9 @@ function update(config, auth, className, restWhere, restObject, clientSDK) {
const hasLiveQuery = checkLiveQuery(className, config);
if (hasTriggers || hasLiveQuery) {
// Do not use find, as it runs the before finds
return new RestQuery(config, auth, className, restWhere)
.forWrite()
.execute();
return new RestQuery(config, auth, className, restWhere).execute({
op: 'update',
});
}
return Promise.resolve({});
})