keeping the target db to what ever client is sending (#443)

This commit is contained in:
Leila Lali
2017-08-25 12:00:43 -07:00
committed by GitHub
parent eb61423f89
commit 5ab995d78f
2 changed files with 4 additions and 10 deletions

View File

@@ -537,15 +537,9 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.RestoreOperation
},
ValidateFunction = (IRestoreDatabaseTaskDataObject restoreDataObject, object currentValue, object defaultValue) =>
{
string errorMessage = string.Empty;
if (currentValue!= null && DatabaseUtils.IsSystemDatabaseConnection(currentValue.ToString()))
{
errorMessage = "Cannot restore to system database";
}
return new OptionValidationResult()
{
IsReadOnly = !restoreDataObject.CanChangeTargetDatabase,
ErrorMessage = errorMessage
IsReadOnly = false
};
},
SetValueFunction = (IRestoreDatabaseTaskDataObject restoreDataObject, object value) =>