From 4fd48d9e4c276de7c18efd03d0f6a24a971ad8a8 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 14 Mar 2022 16:15:10 -0700 Subject: [PATCH] fix: utils.gc constraint issue, closes #3228 --- server/commands/teamPermanentDeleter.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/commands/teamPermanentDeleter.ts b/server/commands/teamPermanentDeleter.ts index 2b342c51e..d67f2ba3e 100644 --- a/server/commands/teamPermanentDeleter.ts +++ b/server/commands/teamPermanentDeleter.ts @@ -86,6 +86,13 @@ export default async function teamPermanentDeleter(team: Team) { force: true, transaction, }); + await Event.destroy({ + where: { + actorId: userIds, + }, + force: true, + transaction, + }); } ); // Destory team-relation models