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,18 +79,18 @@
|
||||||
|
|
||||||
table = $tables.list.find(table => table._id === tableId)
|
table = $tables.list.find(table => table._id === tableId)
|
||||||
|
|
||||||
|
schemaFields = Object.entries(table?.schema ?? {})
|
||||||
|
.filter(entry => {
|
||||||
|
const [, field] = entry
|
||||||
|
return field.type !== "formula" && !field.autocolumn
|
||||||
|
})
|
||||||
|
.sort(([nameA], [nameB]) => {
|
||||||
|
return nameA < nameB ? -1 : 1
|
||||||
|
})
|
||||||
|
|
||||||
if (table) {
|
if (table) {
|
||||||
editableRow["tableId"] = tableId
|
editableRow["tableId"] = tableId
|
||||||
|
|
||||||
schemaFields = Object.entries(table?.schema ?? {})
|
|
||||||
.filter(entry => {
|
|
||||||
const [, field] = entry
|
|
||||||
return field.type !== "formula" && !field.autocolumn
|
|
||||||
})
|
|
||||||
.sort(([nameA], [nameB]) => {
|
|
||||||
return nameA < nameB ? -1 : 1
|
|
||||||
})
|
|
||||||
|
|
||||||
// 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