fix: Cannot delete FileOperation referencing collection
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user