From 5418e1ad94689adb715a3b205564535e4964fb65 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Fri, 21 Jun 2024 14:35:01 +0200 Subject: [PATCH] Fix ban hits table being broken by previous commit --- SS14.Admin/Pages/Bans/Hits.cshtml.cs | 1 + SS14.Admin/Pages/Connections/Index.cshtml.cs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SS14.Admin/Pages/Bans/Hits.cshtml.cs b/SS14.Admin/Pages/Bans/Hits.cshtml.cs index 2611920..fff12b4 100644 --- a/SS14.Admin/Pages/Bans/Hits.cshtml.cs +++ b/SS14.Admin/Pages/Bans/Hits.cshtml.cs @@ -50,6 +50,7 @@ public async Task OnGetAsync( var logQuery = _dbContext.ServerBanHit .Include(b => b.Connection) + .ThenInclude(c => c.Server) .Where(bh => bh.BanId == banEntry.Ban.Id) .Select(bh => bh.Connection); diff --git a/SS14.Admin/Pages/Connections/Index.cshtml.cs b/SS14.Admin/Pages/Connections/Index.cshtml.cs index f4c8e94..a8770ac 100644 --- a/SS14.Admin/Pages/Connections/Index.cshtml.cs +++ b/SS14.Admin/Pages/Connections/Index.cshtml.cs @@ -72,7 +72,7 @@ public async Task OnGetAsync( AllRouteData.Add("showPanic", showPanic.ToString()); AllRouteData.Add("showSet", "true"); - IQueryable logQuery = _dbContext.ConnectionLog; + IQueryable logQuery = _dbContext.ConnectionLog.Include(c => c.Server); logQuery = SearchHelper.SearchConnectionLog(logQuery, search, User); var acceptableDenies = new List(); @@ -101,7 +101,6 @@ public static async Task LoadSortConnectionsTableData( Dictionary allRouteData) { var logs = query - .Include(c => c.Server) .LeftJoin( dbContext.Player, c => c.UserId, p => p.UserId,