From bae96af17f50a80ae3ade235a5ef68d5d2dc12ba Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 1 Dec 2021 22:30:59 +0000 Subject: [PATCH] fix(user-management): :bug: Fixed an issue where you couldn't 'unset' a users custom quality and root folders --- .../usermanagement-user.component.ts | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement-user.component.ts b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement-user.component.ts index 9b9e8bdfd..c772b86aa 100644 --- a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement-user.component.ts +++ b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement-user.component.ts @@ -66,10 +66,22 @@ export class UserManagementUserComponent implements OnInit { } else { this.identityService.getNotificationPreferences().subscribe(x => this.notificationPreferences = x); } - this.sonarrService.getQualityProfilesWithoutSettings().subscribe(x => this.sonarrQualities = x); - this.sonarrService.getRootFoldersWithoutSettings().subscribe(x => this.sonarrRootFolders = x); - this.radarrService.getQualityProfilesFromSettings().subscribe(x => this.radarrQualities = x); - this.radarrService.getRootFoldersFromSettings().subscribe(x => this.radarrRootFolders = x); + this.sonarrService.getQualityProfilesWithoutSettings().subscribe(x => { + this.sonarrQualities = x; + this.sonarrQualities.unshift({id: 0, name: "None"}); + }); + this.sonarrService.getRootFoldersWithoutSettings().subscribe(x => { + this.sonarrRootFolders = x; + this.sonarrRootFolders.unshift({id: 0, path: "None"}); + }); + this.radarrService.getQualityProfilesFromSettings().subscribe(x => { + this.radarrQualities = x; + this.radarrQualities.unshift({id: 0, name: "None"}); + }); + this.radarrService.getRootFoldersFromSettings().subscribe(x => { + this.radarrRootFolders = x; + this.radarrRootFolders.unshift({id: 0, path: "None"}); + }); this.identityService.getUserAccessToken(this.userId).subscribe(x => this.accessToken = x); @@ -179,6 +191,7 @@ export class UserManagementUserComponent implements OnInit { return; } + this.identityService.updateUser(this.user).subscribe(x => { if (x.successful) { this.identityService.updateNotificationPreferences(this.notificationPreferences).subscribe();