1
0
Fork 0
mirror of synced 2024-09-20 11:27:56 +12:00

Fix Automations Breaking When Their Datasource is Deleted (#14195)

This commit is contained in:
Gerard Burns 2024-07-22 09:56:04 +01:00 committed by GitHub
parent 9d8e470aa6
commit f1a56b3831
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)) {