Implement check for connectionstring value (#13641)
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:
@@ -36,7 +36,12 @@ public class DatabaseConfigureStep : InstallSetupStep<DatabaseModel>
|
||||
|
||||
public override Task<InstallSetupResult?> ExecuteAsync(DatabaseModel databaseSettings)
|
||||
{
|
||||
if (!_databaseBuilder.ConfigureDatabaseConnection(databaseSettings, false))
|
||||
if (databaseSettings is null && string.IsNullOrWhiteSpace(_connectionStrings.CurrentValue.ConnectionString) is false)
|
||||
{
|
||||
return Task.FromResult<InstallSetupResult?>(null);
|
||||
}
|
||||
|
||||
if (!_databaseBuilder.ConfigureDatabaseConnection(databaseSettings!, false))
|
||||
{
|
||||
throw new InstallException("Could not connect to the database");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user