From 74219c632da0e2518df38d399f99cee8d571736a Mon Sep 17 00:00:00 2001 From: Wolfgang Witt Date: Tue, 16 Mar 2021 10:07:12 +0000 Subject: [PATCH] Apply 2 suggestion(s) to 2 file(s) --- src/Handler/Exam/AutoOccurrence.hs | 2 +- templates/widgets/massinput/examRooms/layout.hamlet | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Handler/Exam/AutoOccurrence.hs b/src/Handler/Exam/AutoOccurrence.hs index 9b8bff23b..04460a2b0 100644 --- a/src/Handler/Exam/AutoOccurrence.hs +++ b/src/Handler/Exam/AutoOccurrence.hs @@ -165,7 +165,7 @@ postEAutoOccurrenceR tid ssh csh examn = do occMappingRule = examOccurrenceMappingRule eaofMapping loadProp curr max' - | Just max'' <- max', max'' /= 0 + | Just max'' <- assertM (/= 0) max' = MsgProportion (toMessage curr) (toMessage max'') (toRational curr / toRational max'') | otherwise = MsgProportionNoRatio (toMessage curr) $ maybe "∞" toMessage max' diff --git a/templates/widgets/massinput/examRooms/layout.hamlet b/templates/widgets/massinput/examRooms/layout.hamlet index 7d7c5b6d9..6f23215d7 100644 --- a/templates/widgets/massinput/examRooms/layout.hamlet +++ b/templates/widgets/massinput/examRooms/layout.hamlet @@ -18,7 +18,7 @@ $newline never - _{MsgExamRoomCapacityTip} + _{MsgExamRoomCapacityTip}