From 70035e5dcff0a560631695e228c8d7d65d324909 Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Sat, 4 Jan 2020 22:35:25 +0100 Subject: [PATCH] Fix bug with the wrong result being shown --- Handler/Tables.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Handler/Tables.hs b/Handler/Tables.hs index f07cbea..25e81ab 100644 --- a/Handler/Tables.hs +++ b/Handler/Tables.hs @@ -408,7 +408,7 @@ getScore testId variantId = do E.&&. (evaluation ^. EvaluationVersion E.==. E.just (submission ^. SubmissionVersion) E.||. E.isNothing (evaluation ^. EvaluationVersion)) E.&&. evaluation ^. EvaluationTest E.==. E.val testId) - E.orderBy [E.desc (E.isNothing (evaluation ^. EvaluationVersion))] + E.orderBy [E.asc (E.isNothing (evaluation ^. EvaluationVersion))] return evaluation return $ case evaluations of (e:_) -> evaluationScore $ entityVal e