Skip to content

Commit 5c2d617

Browse files
authored
group by fix
1 parent d08cb3a commit 5c2d617

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grade-management/Ahk.GradeManagement/Functions/ListGrades/GradeListing.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ public async Task<IReadOnlyCollection<FinalStudentGrade>> List(string repoPrefix
1616
{
1717
var items = await this.repo.ListConfirmedWithRepositoryPrefix(Normalize.RepoName(repoPrefix));
1818
var finalResults = new List<FinalStudentGrade>();
19-
foreach (var student in items.GroupBy(r => Normalize.Neptun(r.Neptun)))
19+
foreach (var student in items.GroupBy(r => new { Neptun = Normalize.Neptun(r.Neptun), r.GitHubRepoName }))
2020
{
2121
var lastResult = student.OrderByDescending(s => s.Date).First();
2222
finalResults.Add(new FinalStudentGrade(
23-
neptun: student.Key,
24-
repo: lastResult.GitHubRepoName,
23+
neptun: student.Key.Neptun,
24+
repo: lastResult.Key.GitHubRepoName,
2525
prUrl: lastResult.GitHubPrUrl,
2626
points: lastResult.Points == null ? new Dictionary<string, double>() : lastResult.Points.ToDictionary(keySelector: p => p.Name, elementSelector: p => p.Point)));
2727
}

0 commit comments

Comments
 (0)