From 8490cab9b18d270b9befc7590b746638a3b1649c Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 9 Feb 2022 19:40:40 -0800 Subject: [PATCH] fix: Export collections produces empty zip, regressed in #3064 --- server/queues/processors/exports.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/queues/processors/exports.ts b/server/queues/processors/exports.ts index dfd85af55..1d239ff72 100644 --- a/server/queues/processors/exports.ts +++ b/server/queues/processors/exports.ts @@ -23,14 +23,16 @@ export default class ExportsProcessor { invariant(fileOperation, "fileOperation not found"); const collectionIds = - "collectionId" in event + "collectionId" in event && event.collectionId ? event.collectionId : await user.collectionIds(); + const collections = await Collection.findAll({ where: { id: collectionIds, }, }); + this.updateFileOperation(fileOperation, actorId, teamId, { state: "creating", });