From 55319c8c5060a0d8763abb56c27d30e852c51f52 Mon Sep 17 00:00:00 2001 From: Wolfgang Witt Date: Mon, 29 Mar 2021 13:03:04 +0200 Subject: [PATCH] fix: add missing do --- src/Foundation/Authorization.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Foundation/Authorization.hs b/src/Foundation/Authorization.hs index 2be002d27..a318ca559 100644 --- a/src/Foundation/Authorization.hs +++ b/src/Foundation/Authorization.hs @@ -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