Fixing an issue where linked record column deletion was not correctly removing relationships.

This commit is contained in:
Michael Drury 2020-10-14 20:05:13 +01:00
parent dbd6237e44
commit 40325e39c3
1 changed files with 4 additions and 1 deletions

View File

@ -36,7 +36,10 @@ exports.save = async function(ctx) {
let renameDocs = [] let renameDocs = []
// if the table obj had an _id then it will have been retrieved // if the table obj had an _id then it will have been retrieved
const oldTable = ctx.preExisting let oldTable
if (ctx.request.body && ctx.request.body._id) {
oldTable = await db.get(ctx.request.body._id)
}
// rename row fields when table column is renamed // rename row fields when table column is renamed
const { _rename } = tableToSave const { _rename } = tableToSave