fix: JSON import fails if the same import has been imported and deleted previously

This commit is contained in:
Tom Moor
2023-10-01 15:16:55 -04:00
parent 41a6f77998
commit 16cd82a732

View File

@@ -301,6 +301,7 @@ export default abstract class ImportTask extends BaseTask<Props> {
if (item.urlId) {
const existing = await Collection.unscoped().findOne({
attributes: ["id"],
paranoid: false,
transaction,
where: {
urlId: item.urlId,
@@ -413,6 +414,7 @@ export default abstract class ImportTask extends BaseTask<Props> {
if (item.urlId) {
const existing = await Document.unscoped().findOne({
attributes: ["id"],
paranoid: false,
transaction,
where: {
urlId: item.urlId,