From 4433906c3a81d0a61184c5449260134ca9f202f1 Mon Sep 17 00:00:00 2001 From: FeroxFoxxo Date: Tue, 26 Mar 2024 18:10:12 +1300 Subject: [PATCH] Remove deleted modcases --- backend/Punishments/Data/ModCaseRepository.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/Punishments/Data/ModCaseRepository.cs b/backend/Punishments/Data/ModCaseRepository.cs index 4ae67fa8f..8d14f6492 100644 --- a/backend/Punishments/Data/ModCaseRepository.cs +++ b/backend/Punishments/Data/ModCaseRepository.cs @@ -148,6 +148,7 @@ public async Task AddWhoIsInformation(EmbedBuilder embed, IGuildUser user, IInte Translation translator) { var cases = await GetCasesForGuildAndUser(context.Guild.Id, user.Id); + cases = cases.Where(cases => cases.DeletedByUserId > 0).ToList(); var activeCases = cases.FindAll(c => c.PunishmentActive); if (cases.Count > 0)