From 4b56c2e605dbbd613aee1b3e56ae84cb10169642 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Mon, 22 Sep 2025 10:53:42 -0300 Subject: [PATCH] chore: prevent race condition creating multiple setting groups (#37019) Co-authored-by: Rodrigo Nascimento --- apps/meteor/app/settings/server/SettingsRegistry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/app/settings/server/SettingsRegistry.ts b/apps/meteor/app/settings/server/SettingsRegistry.ts index ec9cf6b902f..cb6f9da20ab 100644 --- a/apps/meteor/app/settings/server/SettingsRegistry.ts +++ b/apps/meteor/app/settings/server/SettingsRegistry.ts @@ -223,8 +223,8 @@ export class SettingsRegistry { if (!this.store.has(_id)) { options.ts = new Date(); - await this.model.insertOne(options as ISetting); this.store.set(options as ISetting); + await this.model.insertOne(options as ISetting); } if (!callback) {