]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix settings users initialization before groups
authorshamoon <4887959+shamoon@users.noreply.github.com>
Fri, 22 Sep 2023 06:35:40 +0000 (23:35 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Fri, 22 Sep 2023 06:35:40 +0000 (23:35 -0700)
src-ui/src/app/components/manage/settings/settings.component.ts

index 520cd95204f36d16c8c2d149d2b6aceb8bd08e09..daf4a66656485fa45df91e4d3167f079294f9c00 100644 (file)
@@ -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,