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,