fix: Cannot delete FileOperation referencing collection

This commit is contained in:
Tom Moor
2023-04-25 21:58:24 -04:00
parent 106b335602
commit 01707d733a

View File

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