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,