chore: prevent race condition creating multiple setting groups (#37019)

Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
This commit is contained in:
Guilherme Gazzo 2025-09-22 10:53:42 -03:00 committed by GitHub
parent 2377520c19
commit 4b56c2e605
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {