fix: push notifications badge doesn't update with Installation beforeSave trigger (#8162)

This commit is contained in:
dblythy
2022-09-17 05:43:03 +10:00
committed by GitHub
parent 5250c07a1c
commit 3c75c2ba48
2 changed files with 52 additions and 2 deletions

View File

@@ -217,7 +217,7 @@ RestWrite.prototype.validateSchema = function () {
// Runs any beforeSave triggers against this operation.
// Any change leads to our data being mutated.
RestWrite.prototype.runBeforeSaveTrigger = function () {
if (this.response) {
if (this.response || this.runOptions.many) {
return;
}
@@ -1522,7 +1522,7 @@ RestWrite.prototype.runDatabaseOperation = function () {
// Returns nothing - doesn't wait for the trigger.
RestWrite.prototype.runAfterSaveTrigger = function () {
if (!this.response || !this.response.response) {
if (!this.response || !this.response.response || this.runOptions.many) {
return;
}