From 01707d733a04fd34e25d872f4920eba4b7507cea Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 25 Apr 2023 21:58:24 -0400 Subject: [PATCH] fix: Cannot delete FileOperation referencing collection --- 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 6cffa6e8a..f5588ca37 100644 --- a/server/commands/teamPermanentDeleter.ts +++ b/server/commands/teamPermanentDeleter.ts @@ -111,13 +111,6 @@ async function teamPermanentDeleter(team: Team) { force: true, transaction, }); - await FileOperation.destroy({ - where: { - teamId, - }, - force: true, - transaction, - }); await Collection.destroy({ where: { teamId, @@ -132,6 +125,13 @@ async function teamPermanentDeleter(team: Team) { force: true, transaction, }); + await FileOperation.destroy({ + where: { + teamId, + }, + force: true, + transaction, + }); await Group.unscoped().destroy({ where: { teamId,