Skip to content

Commit

Permalink
Replace the ID of the generated connection profile with the one throu…
Browse files Browse the repository at this point in the history
…gh edit data (microsoft#10413)
  • Loading branch information
Amir Omidi authored May 15, 2020
1 parent 19fab3f commit b519d51
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/sql/platform/connection/common/connectionManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ export interface INewConnectionParams {
showDashboard?: boolean;
providers?: string[];
isEditConnection?: boolean;
oldProfileId?: string; // used for edit connection
}

export interface IConnectableInput {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ export class ConnectionDialogService implements IConnectionDialogService {
}
profile = result.connection;

if (params.oldProfileId && params.isEditConnection) {
profile.id = params.oldProfileId;
}

profile.serverName = trim(profile.serverName);

// append the port to the server name for SQL Server connections
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ export class ConnectionManagementService extends Disposable implements IConnecti
}
let params = {
connectionType: ConnectionType.default,
isEditConnection: true
isEditConnection: true,
oldProfileId: model.id
};

try {
Expand Down

0 comments on commit b519d51

Please sign in to comment.