From e323eb6beabcb3605a7f6afdb52fd0de192db9ba Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Tue, 7 Jan 2020 22:02:06 +0100 Subject: [PATCH] Bring back desc for boolean values --- Handler/Tables.hs | 2 +- app/upgrade-to-0-2.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Handler/Tables.hs b/Handler/Tables.hs index 25e81ab..f07cbea 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.asc (E.isNothing (evaluation ^. EvaluationVersion))] + E.orderBy [E.desc (E.isNothing (evaluation ^. EvaluationVersion))] return evaluation return $ case evaluations of (e:_) -> evaluationScore $ entityVal e diff --git a/app/upgrade-to-0-2.hs b/app/upgrade-to-0-2.hs index e025e51..c636d48 100644 --- a/app/upgrade-to-0-2.hs +++ b/app/upgrade-to-0-2.hs @@ -61,7 +61,7 @@ processVariant dbName (variant, Entity _ submission, Entity _ out, Entity testId E.&&. (evaluation ^. EvaluationVersion E.==. E.just (E.val (submissionVersion submission)) E.||. E.isNothing (evaluation ^. EvaluationVersion)) E.&&. evaluation ^. EvaluationTest E.==. E.val testId) - E.orderBy [E.asc (E.isNothing (evaluation ^. EvaluationVersion))] + E.orderBy [E.desc (E.isNothing (evaluation ^. EvaluationVersion))] return evaluation case evaluations of