Fixing issues with retrieval.
This commit is contained in:
parent
f8e766823c
commit
b75e2e85c6
|
@ -162,9 +162,12 @@ export async function finaliseRow(
|
|||
})
|
||||
}
|
||||
|
||||
const response = await db.put(row)
|
||||
// for response, calculate the formulas for the enriched row
|
||||
enrichedRow._rev = response.rev
|
||||
await db.put(row)
|
||||
const retrieved = await db.tryGet<Row>(row._id)
|
||||
enrichedRow = {
|
||||
...enrichedRow,
|
||||
...retrieved,
|
||||
}
|
||||
enrichedRow = await processFormulas(table, enrichedRow, {
|
||||
dynamic: false,
|
||||
})
|
||||
|
|
|
@ -204,12 +204,11 @@ export async function inputProcessing(
|
|||
|
||||
for (const [key, value] of Object.entries(clonedRow)) {
|
||||
const field = table.schema[key]
|
||||
const isBuiltinColumn = isExternalTableID(table._id!)
|
||||
? isExternalColumnName(key)
|
||||
: isInternalColumnName(key)
|
||||
// cleanse fields that aren't in the schema
|
||||
if (
|
||||
!field && isExternalTableID(table._id!)
|
||||
? !isExternalColumnName(key)
|
||||
: !isInternalColumnName(key)
|
||||
) {
|
||||
if (!field && !isBuiltinColumn) {
|
||||
delete clonedRow[key]
|
||||
}
|
||||
// field isn't found - might be a built-in column, skip over it
|
||||
|
|
Loading…
Reference in New Issue