From c6658bae1f76145f6c1effbc06a436c8da732aa9 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sun, 5 Oct 2025 14:25:59 -0500 Subject: [PATCH] Holy shit EF Core tracking is pissing me off so much now --- KfChatDotNetBot/Commands/KasinoAdminCommands.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/KfChatDotNetBot/Commands/KasinoAdminCommands.cs b/KfChatDotNetBot/Commands/KasinoAdminCommands.cs index d8f99b8..5fd98e5 100644 --- a/KfChatDotNetBot/Commands/KasinoAdminCommands.cs +++ b/KfChatDotNetBot/Commands/KasinoAdminCommands.cs @@ -51,8 +51,9 @@ public class TempExcludeCommand : ICommand $"{user.FormatUsername()}, {targetUser.KfUsername} can't be excluded as he's banned.", true); return; } + targetGambler = await db.Gamblers.FirstOrDefaultAsync(x => x.Id == targetGambler.Id, cancellationToken: ctx); - var activeExclusion = await Money.GetActiveExclusionAsync(targetGambler.Id, ctx); + var activeExclusion = await Money.GetActiveExclusionAsync(targetGambler!.Id, ctx); if (activeExclusion != null) { var length = DateTimeOffset.UtcNow - activeExclusion.Expires;