Fix Automations Breaking When Their Datasource is Deleted (#14195)
This commit is contained in:
parent
9d8e470aa6
commit
f1a56b3831
1 changed files with 9 additions and 9 deletions
|
@ -79,9 +79,6 @@
|
||||||
|
|
||||||
table = $tables.list.find(table => table._id === tableId)
|
table = $tables.list.find(table => table._id === tableId)
|
||||||
|
|
||||||
if (table) {
|
|
||||||
editableRow["tableId"] = tableId
|
|
||||||
|
|
||||||
schemaFields = Object.entries(table?.schema ?? {})
|
schemaFields = Object.entries(table?.schema ?? {})
|
||||||
.filter(entry => {
|
.filter(entry => {
|
||||||
const [, field] = entry
|
const [, field] = entry
|
||||||
|
@ -91,6 +88,9 @@
|
||||||
return nameA < nameB ? -1 : 1
|
return nameA < nameB ? -1 : 1
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (table) {
|
||||||
|
editableRow["tableId"] = tableId
|
||||||
|
|
||||||
// Parse out any data not in the schema.
|
// Parse out any data not in the schema.
|
||||||
for (const column in editableFields) {
|
for (const column in editableFields) {
|
||||||
if (!Object.hasOwn(table?.schema, column)) {
|
if (!Object.hasOwn(table?.schema, column)) {
|
||||||
|
|
Loading…
Reference in a new issue