aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2026-06-30 17:49:15 +0200
committerGitHub <noreply@github.com>2026-06-30 17:49:15 +0200
commita43fd188dc0d2a3cfdd4ae3b71b537780dcb3fc9 (patch)
tree4492c504a4bde90697b970ce066159bbeb0c21a1
parentd3ee1e84b102177e2c368426e3b5ad1dba589b44 (diff)
parentf0115293887bc20d035f6453a8593701d64c0710 (diff)
Merge pull request #17175 from obrenoalvim/fix/use-leftjoin-ef10HEADmaster
Use Enumerable.LeftJoin for activity log user query
-rw-r--r--Jellyfin.Server.Implementations/Activity/ActivityManager.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
index ba24dc3864..f21e94a0fd 100644
--- a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
+++ b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
@@ -56,11 +56,11 @@ public class ActivityManager : IActivityManager
var dbContext = await _provider.CreateDbContextAsync().ConfigureAwait(false);
await using (dbContext.ConfigureAwait(false))
{
- // TODO switch to LeftJoin in .NET 10.
- var entries = from a in dbContext.ActivityLogs
- join u in dbContext.Users on a.UserId equals u.Id into ugj
- from u in ugj.DefaultIfEmpty()
- select new ExpandedActivityLog { ActivityLog = a, Username = u.Username };
+ var entries = dbContext.ActivityLogs.LeftJoin(
+ dbContext.Users,
+ a => a.UserId,
+ u => u.Id,
+ (a, u) => new ExpandedActivityLog { ActivityLog = a, Username = u == null ? null : u.Username });
if (query.HasUserId is not null)
{