mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-24 01:25:42 -05:00
keeping the target db to what ever client is sending (#443)
This commit is contained in:
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user