diff --git a/src/Handler/Utils/Exam.hs b/src/Handler/Utils/Exam.hs index 03296e157..ce751ecaf 100644 --- a/src/Handler/Utils/Exam.hs +++ b/src/Handler/Utils/Exam.hs @@ -347,7 +347,8 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences ] takeEnd n chars = drop (length chars - n) chars in Map.mapKeysWith Set.union (takeEnd . F.minimum . Set.map length $ Map.keysSet matrUsers) matrUsers - _ -> Map.singleton [] $ Map.keysSet users + _ | null users-> Map.empty + | otherwise -> Map.singleton [] $ Map.keysSet users occurrences' :: Map ExamOccurrenceId Natural -- ^ reduce room capacity for every pre-assigned user by 1