From ab8cb36fd8e3c9f3a35a0317c0e04f9192945cf9 Mon Sep 17 00:00:00 2001 From: jay-tux Date: Tue, 29 Apr 2025 13:37:58 +0200 Subject: [PATCH] Small oversight --- .../kotlin/com/jaytux/grader/viewmodel/DbState.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 b5a67eb..be48be2 100644 --- a/composeApp/src/desktopMain/kotlin/com/jaytux/grader/viewmodel/DbState.kt +++ b/composeApp/src/desktopMain/kotlin/com/jaytux/grader/viewmodel/DbState.kt @@ -731,7 +731,10 @@ class PeerEvaluationState(val evaluation: PeerEvaluation) { private fun Transaction.loadContents(): List { return evaluation.edition.groups.map { group -> val globalNotes = PeerEvaluationContents.selectAll() - .where { PeerEvaluationContents.groupId eq group.id }.firstOrNull()?.let { + .where { + (PeerEvaluationContents.groupId eq group.id) and + (PeerEvaluationContents.peerEvaluationId eq evaluation.id) + }.firstOrNull()?.let { it[PeerEvaluationContents.content] }