From 54099d84416b448a969c96c5ede1843d3cf17464 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 21 Sep 2023 23:35:40 -0700 Subject: [PATCH] Fix settings users initialization before groups --- .../app/components/manage/settings/settings.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src-ui/src/app/components/manage/settings/settings.component.ts b/src-ui/src/app/components/manage/settings/settings.component.ts index 520cd9520..daf4a6665 100644 --- a/src-ui/src/app/components/manage/settings/settings.component.ts +++ b/src-ui/src/app/components/manage/settings/settings.component.ts @@ -346,6 +346,7 @@ export class SettingsComponent .subscribe({ next: (r) => { this.users = r.results + this.initialize(false) }, error: (e) => { this.toastService.showError($localize`Error retrieving users`, e) @@ -382,9 +383,8 @@ export class SettingsComponent } } - if (this.users && this.groups) { + if (this.users) { this.emptyGroup(this.usersGroup) - this.emptyGroup(this.groupsGroup) for (let user of this.users) { storeData.usersGroup[user.id.toString()] = { @@ -411,7 +411,9 @@ export class SettingsComponent }) ) } - + } + if (this.groups) { + this.emptyGroup(this.groupsGroup) for (let group of this.groups) { storeData.groupsGroup[group.id.toString()] = { id: group.id,