fix: make sure to report NoUsers, regardless of rule

This commit is contained in:
Wolfgang Witt 2021-03-01 19:39:34 +01:00 committed by Wolfgang Witt
parent e13049d958
commit 9c928b0375

View File

@ -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