mirror of
https://github.com/RocketChat/Rocket.Chat.git
synced 2025-12-28 06:47:25 +00:00
chore: prevent race condition creating multiple setting groups (#37019)
Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
This commit is contained in:
parent
2377520c19
commit
4b56c2e605
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user