changeset 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 3866c19535fd
children 781d8b980be1
files ServerMonitor/Objects/Server.cs
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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());