diff --git a/WebApp/Components/Features/Teams/Printout.razor b/WebApp/Components/Features/Teams/Printout.razor index e0059ca..0d264fb 100644 --- a/WebApp/Components/Features/Teams/Printout.razor +++ b/WebApp/Components/Features/Teams/Printout.razor @@ -41,9 +41,8 @@ else @{ var students = context.Students - .OrderByDescending(s => s == context.Captain) - .ThenByDescending(e => e.Grade) - .ThenByDescending(e => e.TsaYear) + .OrderByDescending(s => context.Captain != null && context.Captain.Equals(s)) + .ThenByDescending(e => e.Grade + e.TsaYear) .ThenBy(e => e.FirstName) .ToArray(); } @@ -233,6 +232,7 @@ else .AsNoTracking() .Include(e => e.Event) .Include(e => e.Students) + .Include(e => e.Captain) .OrderByEventFormatFirst() .ThenBy(e => e.Event.Name) .ThenBy(e => e.Identifier ?? "")