1
0
Fork 0
mirror of synced 2024-07-15 19:25:55 +12:00

tableId null safety

This commit is contained in:
Mel O'Hagan 2022-08-19 14:57:15 +01:00
parent bfaf1e61e4
commit ef7b7079b0

View file

@ -125,6 +125,14 @@ const hasNullFilters = filters =>
exports.run = async function ({ inputs, appId }) {
const { tableId, filters, sortColumn, sortOrder, limit } = inputs
if (!tableId) {
return {
success: false,
response: {
message: "You must select a table to query.",
},
}
}
const table = await getTable(appId, tableId)
let sortType = FieldTypes.STRING
if (table && table.schema && table.schema[sortColumn] && sortColumn) {