mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
fix compare after opening scmp with dacpacs failing (#6201)
This commit is contained in:
@@ -880,7 +880,16 @@ export class SchemaCompareResult {
|
||||
this.sourceEndpointInfo.ownerUri = ownerUri;
|
||||
}
|
||||
} else {
|
||||
this.sourceEndpointInfo = result.sourceEndpointInfo;
|
||||
// need to do this instead of just setting it to the result.sourceEndpointInfo because some fields are null which will cause an error when sending the compare request
|
||||
this.sourceEndpointInfo = {
|
||||
endpointType: azdata.SchemaCompareEndpointType.Dacpac,
|
||||
serverDisplayName: '',
|
||||
serverName: '',
|
||||
databaseName: '',
|
||||
ownerUri: '',
|
||||
packageFilePath: result.sourceEndpointInfo.packageFilePath,
|
||||
connectionDetails: undefined
|
||||
};
|
||||
}
|
||||
|
||||
if (result.targetEndpointInfo && result.targetEndpointInfo.endpointType === azdata.SchemaCompareEndpointType.Database) {
|
||||
@@ -890,7 +899,16 @@ export class SchemaCompareResult {
|
||||
this.targetEndpointInfo.ownerUri = ownerUri;
|
||||
}
|
||||
} else {
|
||||
this.targetEndpointInfo = result.targetEndpointInfo;
|
||||
// need to do this instead of just setting it to the result.targetEndpointInfo because some fields are null which will cause an error when sending the compare request
|
||||
this.targetEndpointInfo = {
|
||||
endpointType: azdata.SchemaCompareEndpointType.Dacpac,
|
||||
serverDisplayName: '',
|
||||
serverName: '',
|
||||
databaseName: '',
|
||||
ownerUri: '',
|
||||
packageFilePath: result.targetEndpointInfo.packageFilePath,
|
||||
connectionDetails: undefined
|
||||
};
|
||||
}
|
||||
|
||||
this.updateSourceAndTarget();
|
||||
|
||||
Reference in New Issue
Block a user