fix: add missing do

This commit is contained in:
Wolfgang Witt 2021-03-29 13:03:04 +02:00 committed by Gregor Kleen
parent 67d6fd7d43
commit 55319c8c50

View File

@ -1505,7 +1505,7 @@ tagAccessPredicate AuthCapacity = APDB $ \_ _ _ route _ -> case route of
eid <- $cachedHereBinary (cid, examn) . MaybeT . getKeyBy $ UniqueExam cid examn
Entity occId ExamOccurrence{..} <- $cachedHereBinary (eid, occn) . MaybeT . getBy $ UniqueExamOccurrence eid occn
-- Nothing means unlimited size
whenIsJust examOccurrenceCapacity $ \capacity ->
whenIsJust examOccurrenceCapacity $ \capacity -> do
registered <- $cachedHereBinary occId . lift $ fromIntegral <$> count [ ExamRegistrationOccurrence ==. Just occId, ExamRegistrationExam ==. eid ]
guard $ capacity > registered
return Authorized