Fixing an issue with save row, changing how pre existing was handled caused an issue.
This commit is contained in:
parent
eea3ab8b07
commit
fa6267a2ac
|
@ -130,12 +130,14 @@ exports.save = async function(ctx) {
|
|||
}
|
||||
|
||||
// if the row obj had an _id then it will have been retrieved
|
||||
if (inputs._id && inputs._rev) {
|
||||
const existingRow = await db.get(inputs._id)
|
||||
if (existingRow) {
|
||||
ctx.params.rowId = inputs._id
|
||||
await exports.patch(ctx)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (!inputs._rev && !inputs._id) {
|
||||
// TODO remove special user case in future
|
||||
|
|
Loading…
Reference in New Issue