mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Add check for abandoned gamblers so it creates a new entity
This commit is contained in:
@@ -228,7 +228,7 @@ public static class Money
|
|||||||
await db.Gamblers.AsNoTracking().OrderBy(x => x.Id).Include(x => x.User).LastOrDefaultAsync(g => g.User.Id == user.Id && g.State != GamblerState.PermanentlyBanned,
|
await db.Gamblers.AsNoTracking().OrderBy(x => x.Id).Include(x => x.User).LastOrDefaultAsync(g => g.User.Id == user.Id && g.State != GamblerState.PermanentlyBanned,
|
||||||
cancellationToken: ct);
|
cancellationToken: ct);
|
||||||
_logger.Info($"Retrieved entity for {user.KfUsername}. Is Gambler Entity Null? => {gambler == null}");
|
_logger.Info($"Retrieved entity for {user.KfUsername}. Is Gambler Entity Null? => {gambler == null}");
|
||||||
if (gambler != null)
|
if (gambler != null && gambler.State != GamblerState.Abandoned)
|
||||||
{
|
{
|
||||||
_logger.Info($"Gambler entity details: {gambler.Id}, Created: {gambler.Created:o}");
|
_logger.Info($"Gambler entity details: {gambler.Id}, Created: {gambler.Created:o}");
|
||||||
return gambler;
|
return gambler;
|
||||||
|
|||||||
Reference in New Issue
Block a user