From 83b687a63245afcc530f0da9d054bbf4ccffc438 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 30 Nov 2022 23:07:37 -0500 Subject: [PATCH] fix: teamPermanentDeleter execution order --- server/commands/teamPermanentDeleter.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/commands/teamPermanentDeleter.ts b/server/commands/teamPermanentDeleter.ts index cd47aad13..20b527c09 100644 --- a/server/commands/teamPermanentDeleter.ts +++ b/server/commands/teamPermanentDeleter.ts @@ -112,6 +112,13 @@ async function teamPermanentDeleter(team: Team) { force: true, transaction, }); + await FileOperation.destroy({ + where: { + teamId, + }, + force: true, + transaction, + }); await Collection.destroy({ where: { teamId, @@ -126,13 +133,6 @@ async function teamPermanentDeleter(team: Team) { force: true, transaction, }); - await FileOperation.destroy({ - where: { - teamId, - }, - force: true, - transaction, - }); await Group.unscoped().destroy({ where: { teamId,