[FIX] tests not passing
This commit is contained in:
@@ -20,7 +20,7 @@ service cloud.firestore {
|
|||||||
|
|
||||||
function isSetOwnerAndHasNoGroups(setId) {
|
function isSetOwnerAndHasNoGroups(setId) {
|
||||||
let data = get(/databases/$(database)/documents/sets/$(setId)).data;
|
let data = get(/databases/$(database)/documents/sets/$(setId)).data;
|
||||||
return data.owner == request.auth.uid && (data == null || data.groups == null || data.groups == []);
|
return data.owner == request.auth.uid && (data == null || !("groups" in data) || data.groups == []);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isSetOwnerOrIsPublic(setId) {
|
function isSetOwnerOrIsPublic(setId) {
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ exports.createProgress = functions.https.onCall((data, context) => {
|
|||||||
data.dataToSet
|
data.dataToSet
|
||||||
);
|
);
|
||||||
|
|
||||||
promises.push(batches[batches.length - 1].commit());
|
if (!((batches[batches.length - 1]._delegate && batches[batches.length - 1]._delegate._committed === true) || batches[batches.length - 1]._committed === true)) promises.push(batches[batches.length - 1].commit());
|
||||||
|
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user