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] }