mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fix create project from database for contained database (#15618)
This commit is contained in:
@@ -228,9 +228,16 @@ export class CreateProjectFromDatabaseDialog {
|
|||||||
// populate database dropdown with the databases for this connection
|
// populate database dropdown with the databases for this connection
|
||||||
if (connectionId) {
|
if (connectionId) {
|
||||||
this.sourceDatabaseDropDown!.loading = true;
|
this.sourceDatabaseDropDown!.loading = true;
|
||||||
const databaseValues = (await azdata.connection.listDatabases(connectionId))
|
let databaseValues;
|
||||||
// filter out system dbs
|
try {
|
||||||
.filter(db => !constants.systemDbs.includes(db));
|
databaseValues = (await azdata.connection.listDatabases(connectionId))
|
||||||
|
// filter out system dbs
|
||||||
|
.filter(db => !constants.systemDbs.includes(db));
|
||||||
|
} catch (e) {
|
||||||
|
// if the user doesn't have access to master, just set the database of the connection profile
|
||||||
|
databaseValues = [databaseName!];
|
||||||
|
console.warn(e);
|
||||||
|
}
|
||||||
|
|
||||||
this.sourceDatabaseDropDown!.values = databaseValues;
|
this.sourceDatabaseDropDown!.values = databaseValues;
|
||||||
this.sourceDatabaseDropDown!.loading = false;
|
this.sourceDatabaseDropDown!.loading = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user