Merge pull request #2431 from chlupac/InstallFix

Unattended installation fix
This commit is contained in:
Shaun Walker 2022-09-30 11:49:06 -04:00 committed by GitHub
commit 68ada8fbe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,6 @@ namespace Oqtane.Infrastructure
if (!string.IsNullOrEmpty(_config.GetConnectionString(SettingKeys.ConnectionStringKey))) if (!string.IsNullOrEmpty(_config.GetConnectionString(SettingKeys.ConnectionStringKey)))
{ {
result.Success = true;
using (var db = GetInstallationContext()) using (var db = GetInstallationContext())
{ {
if (db.Database.CanConnect()) if (db.Database.CanConnect())
@ -60,6 +59,7 @@ namespace Oqtane.Infrastructure
{ {
// verify master database contains a Tenant table ( ie. validate schema is properly provisioned ) // verify master database contains a Tenant table ( ie. validate schema is properly provisioned )
var provisioned = db.Tenant.Any(); var provisioned = db.Tenant.Any();
result.Success = true;
} }
catch (Exception ex) catch (Exception ex)
{ {