fix: check space of occurrences after ignoring
This commit is contained in:
parent
11664dcd82
commit
fabf56c164
@ -45,6 +45,7 @@ import qualified Data.Array as Array
|
||||
import Data.Array.ST (STArray, STUArray)
|
||||
import qualified Data.Array.ST as ST
|
||||
|
||||
import Data.Foldable (foldMap')
|
||||
import Data.List (findIndex, unfoldr)
|
||||
import qualified Data.List as List
|
||||
|
||||
@ -392,7 +393,7 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences
|
||||
| otherwise -> Map.singleton [] $ Map.keysSet users
|
||||
|
||||
occurrencesSize :: ExamOccurrenceCapacity
|
||||
occurrencesSize = fold occurrences'
|
||||
occurrencesSize = foldMap' (view _2) occurrences''
|
||||
|
||||
occurrences' :: Map ExamOccurrenceId ExamOccurrenceCapacity
|
||||
-- ^ reduce room capacity for every pre-assigned user by 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user