mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
fix issue where sometimes ownerUri was null (#7094)
This commit is contained in:
committed by
Karl Burtram
parent
ba4c98cb0a
commit
460c739a8d
@@ -43,13 +43,12 @@ export class CmsResourceTreeNode extends CmsResourceTreeNodeBase {
|
|||||||
this.connection.options.password = await this.appContext.cmsUtils.getPassword(this.connection.options.user);
|
this.connection.options.password = await this.appContext.cmsUtils.getPassword(this.connection.options.user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.appContext.cmsUtils.createCmsServer(this.connection, this.name, this.description).then((result) => {
|
return this.appContext.cmsUtils.createCmsServer(this.connection, this.name, this.description).then(async (result) => {
|
||||||
// cache new connection is different from old one
|
// update the owner uri and the connection
|
||||||
if (this.appContext.cmsUtils.didConnectionChange(this._connection, result.connection)) {
|
this._ownerUri = result.ownerUri;
|
||||||
this._connection = result.connection;
|
this._connection = result.connection;
|
||||||
this._ownerUri = result.ownerUri;
|
await this.appContext.cmsUtils.cacheRegisteredCmsServer(this.name, this.description, this.ownerUri, this.connection);
|
||||||
this.appContext.cmsUtils.cacheRegisteredCmsServer(this.name, this.description, this.ownerUri, this.connection);
|
|
||||||
}
|
|
||||||
if (result.listRegisteredServersResult.registeredServersList) {
|
if (result.listRegisteredServersResult.registeredServersList) {
|
||||||
result.listRegisteredServersResult.registeredServersList.forEach((registeredServer) => {
|
result.listRegisteredServersResult.registeredServersList.forEach((registeredServer) => {
|
||||||
nodes.push(new RegisteredServerTreeNode(
|
nodes.push(new RegisteredServerTreeNode(
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export class CmsResourceTreeProvider implements TreeDataProvider<TreeNode>, ICms
|
|||||||
server.ownerUri,
|
server.ownerUri,
|
||||||
server.connection,
|
server.connection,
|
||||||
this._appContext, this, null));
|
this._appContext, this, null));
|
||||||
this.appContext.cmsUtils.cacheRegisteredCmsServer(server.name, server.description,
|
await this.appContext.cmsUtils.cacheRegisteredCmsServer(server.name, server.description,
|
||||||
server.ownerUri, server.connection);
|
server.ownerUri, server.connection);
|
||||||
});
|
});
|
||||||
return servers;
|
return servers;
|
||||||
|
|||||||
Reference in New Issue
Block a user