Mercurial > servermonitor
diff ServerMonitor/Objects/Server.cs @ 24:06ff59b59e70
Fix not being able to enable a server with a blank SSH key even if it has no SSH checks.
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Thu, 30 May 2019 21:40:57 -0400 |
parents | 68d7834dc28e |
children | b5502ce8cb1f |
line wrap: on
line diff
--- a/ServerMonitor/Objects/Server.cs Thu May 30 21:40:27 2019 -0400 +++ b/ServerMonitor/Objects/Server.cs Thu May 30 21:40:57 2019 -0400 @@ -139,7 +139,7 @@ // Do not allow enabling the server if the private key is not accessible. // Do not fire the EnabledChanged event if the Enabled state is not actually changing // from its existing value. - if ((LoginType == LoginType.PrivateKey && PrivateKeyFile == null && value == true) || value == _enabled) + if ((LoginType == LoginType.PrivateKey && PrivateKeyFile == null && value == true && Checks.Any(c => c is SshCheck)) || value == _enabled) return; _enabled = value; EnabledChanged?.Invoke(this, new EventArgs());