fix: add missing do
This commit is contained in:
parent
67d6fd7d43
commit
55319c8c50
@ -1505,7 +1505,7 @@ tagAccessPredicate AuthCapacity = APDB $ \_ _ _ route _ -> case route of
|
|||||||
eid <- $cachedHereBinary (cid, examn) . MaybeT . getKeyBy $ UniqueExam cid examn
|
eid <- $cachedHereBinary (cid, examn) . MaybeT . getKeyBy $ UniqueExam cid examn
|
||||||
Entity occId ExamOccurrence{..} <- $cachedHereBinary (eid, occn) . MaybeT . getBy $ UniqueExamOccurrence eid occn
|
Entity occId ExamOccurrence{..} <- $cachedHereBinary (eid, occn) . MaybeT . getBy $ UniqueExamOccurrence eid occn
|
||||||
-- Nothing means unlimited size
|
-- Nothing means unlimited size
|
||||||
whenIsJust examOccurrenceCapacity $ \capacity ->
|
whenIsJust examOccurrenceCapacity $ \capacity -> do
|
||||||
registered <- $cachedHereBinary occId . lift $ fromIntegral <$> count [ ExamRegistrationOccurrence ==. Just occId, ExamRegistrationExam ==. eid ]
|
registered <- $cachedHereBinary occId . lift $ fromIntegral <$> count [ ExamRegistrationOccurrence ==. Just occId, ExamRegistrationExam ==. eid ]
|
||||||
guard $ capacity > registered
|
guard $ capacity > registered
|
||||||
return Authorized
|
return Authorized
|
||||||
|
|||||||
Reference in New Issue
Block a user