|
|
@@ -41,7 +41,8 @@ const fetch = async (Type, refs) => {
|
|
|
const recs = dict(await Type.findAll({
|
|
|
where: {
|
|
|
[Op.or]: or
|
|
|
- }
|
|
|
+ },
|
|
|
+ paranoid: false
|
|
|
}))
|
|
|
if (recs.length !== ids.length + keys.length) {
|
|
|
const missing = [
|
|
|
@@ -64,7 +65,7 @@ const upsert = async (Type, object, fields) => {
|
|
|
throw new Error(`Missing upsert field '${field}' in ${JSON.stringify(object)}.`)
|
|
|
}
|
|
|
}
|
|
|
- const existing = await Type.findOne({where: _.pick(object, fields)})
|
|
|
+ const existing = await Type.findOne({where: _.pick(object, fields), paranoid: false})
|
|
|
let record
|
|
|
if (existing) {
|
|
|
Object.assign(existing, object)
|