fix(core-connections): connection name autofill

This commit is contained in:
Wroud
2020-09-27 12:08:13 +03:00
parent b2b6a86b38
commit a4ab5fb774
2 changed files with 1 additions and 3 deletions
@@ -122,7 +122,7 @@ implements IInitializableController {
const databaseNames = ['New', ...this.drivers.map(driver => driver.name!)]
.filter(Boolean);
if (!this.model.connection.name
if (this.model.connection.name === undefined
|| (this.nameTemplate.test(this.model.connection.name)
&& databaseNames.some(driver => this.model.connection.name.startsWith(driver)))
) {
@@ -75,7 +75,6 @@ export class CreateConnectionController {
id: uuid(),
driverId,
template: false,
name: '',
authProperties: [],
properties: {},
} as Partial<ConnectionInfo> as any;
@@ -87,7 +86,6 @@ export class CreateConnectionController {
id: uuid(),
driverId: database.defaultDriver,
template: false,
name: '',
host: database.host,
port: `${database.port}`,
authProperties: [],