fix: teamPermanentDeleter execution order

This commit is contained in:
Tom Moor
2022-11-30 23:07:37 -05:00
parent 648424fe2c
commit 83b687a632

View File

@@ -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,