From 88449e958065a4851103d685946aa31fd6ac08a7 Mon Sep 17 00:00:00 2001 From: jay-tux Date: Tue, 29 Apr 2025 11:24:10 +0200 Subject: [PATCH] Fix bug in peer evaluation data loading --- .../com/jaytux/grader/viewmodel/DbState.kt | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/composeApp/src/desktopMain/kotlin/com/jaytux/grader/viewmodel/DbState.kt b/composeApp/src/desktopMain/kotlin/com/jaytux/grader/viewmodel/DbState.kt index 9998e53..d57c085 100644 --- a/composeApp/src/desktopMain/kotlin/com/jaytux/grader/viewmodel/DbState.kt +++ b/composeApp/src/desktopMain/kotlin/com/jaytux/grader/viewmodel/DbState.kt @@ -730,7 +730,8 @@ class PeerEvaluationState(val evaluation: PeerEvaluation) { private fun Transaction.loadContents(): List { val found = (Groups leftJoin PeerEvaluationContents).selectAll().where { - Groups.editionId eq evaluation.edition.id + (Groups.editionId eq evaluation.edition.id) and + (PeerEvaluationContents.peerEvaluationId eq evaluation.id) }.associate { gc -> val group = Group[gc[Groups.id]] val content = gc[PeerEvaluationContents.content] ?: "" @@ -799,22 +800,3 @@ class PeerEvaluationState(val evaluation: PeerEvaluation) { contents.refresh() } } - - - - - - - - - - - - - - - - - - -