Return true if connectionstring configured (#13640)

Signed-off-by: Zeegaan <nge@umbraco.dk>

Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
This commit is contained in:
Nikolaj Geisle
2023-01-09 08:53:31 +01:00
committed by GitHub
parent 08c1708730
commit c81918c9ee

View File

@@ -47,20 +47,7 @@ public class DatabaseConfigureStep : IInstallStep
// If the connection string is already present in config we don't need to configure it again
if (_connectionStrings.CurrentValue.IsConnectionStringConfigured())
{
try
{
// Since a connection string was present we verify the db can connect and query
_databaseBuilder.ValidateSchema();
return Task.FromResult(false);
}
catch (Exception ex)
{
// Something went wrong, could not connect so probably need to reconfigure
_logger.LogError(ex, "An error occurred, reconfiguring...");
return Task.FromResult(true);
}
return Task.FromResult(false);
}
return Task.FromResult(true);