fix: Database transaction used after committed

This commit is contained in:
Tom Moor
2023-06-30 17:15:40 -04:00
parent 64b2bfe704
commit 88775cd287
3 changed files with 7 additions and 6 deletions

View File

@@ -62,7 +62,7 @@ export default class ImportJSONTask extends ImportTask {
documents: { [id: string]: DocumentJSONExport },
collectionId: string
) {
Object.values(documents).forEach(async (node) => {
Object.values(documents).forEach((node) => {
const id = uuidv4();
output.documents.push({
...node,
@@ -89,7 +89,7 @@ export default class ImportJSONTask extends ImportTask {
async function mapAttachments(attachments: {
[id: string]: AttachmentJSONExport;
}) {
Object.values(attachments).forEach(async (node) => {
Object.values(attachments).forEach((node) => {
const id = uuidv4();
const zipObject = zip.files[node.key];
const mimeType = mime.lookup(node.key) || "application/octet-stream";