fix(wizard): Fixed an issue when using Plex OAuth it could fail setting up

This commit is contained in:
Jamie 2022-04-07 19:50:33 +01:00 committed by GitHub
commit b743cf4faf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,7 @@ namespace Ombi.Controllers.V1
public async Task<SaveWizardResult> CreateWizardUser([FromBody] CreateUserWizardModel user) public async Task<SaveWizardResult> CreateWizardUser([FromBody] CreateUserWizardModel user)
{ {
var users = UserManager.Users; var users = UserManager.Users;
if (users.Any(x => x.UserType == UserType.LocalUser)) if (users.Any(x => x.UserType != UserType.SystemUser))
{ {
// No one should be calling this. Only the wizard // No one should be calling this. Only the wizard
return new SaveWizardResult { Result = false, Errors = new List<string> { "Looks like there is an existing user!" } }; return new SaveWizardResult { Result = false, Errors = new List<string> { "Looks like there is an existing user!" } };