diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/GlobalSettings/EnvironmentValidator.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/GlobalSettings/EnvironmentValidator.cs index a568481a8e..6f2b672806 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/GlobalSettings/EnvironmentValidator.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/GlobalSettings/EnvironmentValidator.cs @@ -6,8 +6,9 @@ public interface IEnvironmentValidator : IValidator; public class EnvironmentValidator : IEnvironmentValidator { - public async Task> ValidateAsync(EnvironmentRequest value) => - value.IsSelfHosted && value.PasswordManagerSubscriptionUpdate.SeatsRequiredToAdd > 0 ? - new Invalid(new CannotAutoScaleOnSelfHostError(value)) : - new Valid(value); + public Task> ValidateAsync(EnvironmentRequest value) => + Task.FromResult>( + value.IsSelfHosted && value.PasswordManagerSubscriptionUpdate.SeatsRequiredToAdd > 0 ? + new Invalid(new CannotAutoScaleOnSelfHostError(value)) : + new Valid(value)); }