Handle error when running an automation with a deleted column
This commit is contained in:
parent
8a5a1bf1ab
commit
6fe202a429
|
@ -85,7 +85,7 @@ exports.run = async function ({ inputs, appId }) {
|
|||
const { tableId, filters, sortColumn, sortOrder, limit } = inputs
|
||||
const table = await getTable(appId, tableId)
|
||||
let sortType = FieldTypes.STRING
|
||||
if (table && table.schema && sortColumn) {
|
||||
if (table && table.schema && table.schema[sortColumn] && sortColumn) {
|
||||
const fieldType = table.schema[sortColumn].type
|
||||
sortType =
|
||||
fieldType === FieldTypes.NUMBER ? FieldTypes.NUMBER : FieldTypes.STRING
|
||||
|
|
Loading…
Reference in New Issue