From 317b95be317ea038ad9fa398fc0c0c456b53495d Mon Sep 17 00:00:00 2001 From: Wolfgang Witt Date: Sat, 6 Feb 2021 15:42:24 +0100 Subject: [PATCH] fix: check if number of relevant user is >0 to prevent crash --- src/Handler/Utils/Exam.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/Utils/Exam.hs b/src/Handler/Utils/Exam.hs index 872d63c35..cfb4124c2 100644 --- a/src/Handler/Utils/Exam.hs +++ b/src/Handler/Utils/Exam.hs @@ -269,7 +269,7 @@ examAutoOccurrence :: forall seed. examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences users | sum occurrences' < usersCount || sum occurrences' <= 0 - || Map.null users + || Map.null users' = nullResult | otherwise = case rule of