Only set Restrict Access if a non-null value is provided (#2140)

This commit is contained in:
Cory Rivera
2023-07-11 17:11:58 -07:00
committed by GitHub
parent cba04072c7
commit 88ec8713d0

View File

@@ -479,9 +479,12 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectManagement
// AutoCreateStatisticsIncremental can only be set when AutoCreateStatistics is enabled
prototype.AutoCreateStatisticsIncremental = database.AutoCreateIncrementalStatistics;
prototype.AutoCreateStatistics = database.AutoCreateStatistics;
prototype.AutoShrink= database.AutoShrink;
prototype.AutoShrink = database.AutoShrink;
prototype.AutoUpdateStatistics = database.AutoUpdateStatistics;
prototype.RestrictAccess = database.RestrictAccess;
if (database.RestrictAccess != null)
{
prototype.RestrictAccess = database.RestrictAccess;
}
if (prototype is DatabasePrototypeAzure dbAz)
{