Browse Source

Handle error when running an automation with a deleted column

pull/4976/head
Peter Clement 5 years ago
parent
commit
496e4d5e87
  1. 2
      packages/server/src/automations/steps/queryRows.js

2
packages/server/src/automations/steps/queryRows.js

@ -85,7 +85,7 @@ exports.run = async function ({ inputs, appId }) {
const { tableId, filters, sortColumn, sortOrder, limit } = inputs const { tableId, filters, sortColumn, sortOrder, limit } = inputs
const table = await getTable(appId, tableId) const table = await getTable(appId, tableId)
let sortType = FieldTypes.STRING let sortType = FieldTypes.STRING
if (table && table.schema && sortColumn) { if (table && table.schema && table.schema[sortColumn] && sortColumn) {
const fieldType = table.schema[sortColumn].type const fieldType = table.schema[sortColumn].type
sortType = sortType =
fieldType === FieldTypes.NUMBER ? FieldTypes.NUMBER : FieldTypes.STRING fieldType === FieldTypes.NUMBER ? FieldTypes.NUMBER : FieldTypes.STRING

Loading…
Cancel
Save