Allow tables to be created even if no fetch
This commit is contained in:
parent
6cd4b358d2
commit
4b05cd2d2d
|
@ -7,9 +7,9 @@
|
|||
|
||||
let name = ""
|
||||
let submitted = false
|
||||
$: valid = name && name.length > 0 && !datasource?.entities[name]
|
||||
$: valid = name && name.length > 0 && !datasource?.entities?.[name]
|
||||
$: error =
|
||||
!submitted && name && datasource?.entities[name]
|
||||
!submitted && name && datasource?.entities?.[name]
|
||||
? "Table name already in use."
|
||||
: null
|
||||
|
||||
|
|
|
@ -190,6 +190,9 @@ exports.save = async function (ctx) {
|
|||
|
||||
const db = getAppDB()
|
||||
const datasource = await db.get(datasourceId)
|
||||
if (!datasource.entities) {
|
||||
datasource.entities = {}
|
||||
}
|
||||
const oldTables = cloneDeep(datasource.entities)
|
||||
const tables = datasource.entities
|
||||
|
||||
|
|
Loading…
Reference in New Issue