mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
fix dacpac wizard not using correct connection (#21387)
This commit is contained in:
@@ -101,7 +101,16 @@ export class DataTierApplicationWizard {
|
|||||||
this.model.database = profile.databaseName;
|
this.model.database = profile.databaseName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get the connection of the node the wizard was launched from
|
||||||
|
if (profile?.id) {
|
||||||
|
this.connection = await azdata.connection.getConnection(await azdata.connection.getUriForConnection((profile.id)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// if no profile was passed in if launched from command palette, try using the current active connection
|
||||||
|
if (!this.connection) {
|
||||||
this.connection = await azdata.connection.getCurrentConnection();
|
this.connection = await azdata.connection.getCurrentConnection();
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.connection || (profile && this.connection.connectionId !== profile.id)) {
|
if (!this.connection || (profile && this.connection.connectionId !== profile.id)) {
|
||||||
// check if there are any active connections
|
// check if there are any active connections
|
||||||
const connections = await azdata.connection.getConnections(true);
|
const connections = await azdata.connection.getConnections(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user