fix: correctly apply suggestion
This commit is contained in:
parent
fcc5930a3c
commit
67d6fd7d43
@ -1504,7 +1504,6 @@ tagAccessPredicate AuthCapacity = APDB $ \_ _ _ route _ -> case route of
|
||||
cid <- $cachedHereBinary (tid, ssh, csh) . MaybeT . getKeyBy $ TermSchoolCourseShort tid ssh csh
|
||||
eid <- $cachedHereBinary (cid, examn) . MaybeT . getKeyBy $ UniqueExam cid examn
|
||||
Entity occId ExamOccurrence{..} <- $cachedHereBinary (eid, occn) . MaybeT . getBy $ UniqueExamOccurrence eid occn
|
||||
registered <- $cachedHereBinary occId . lift $ fromIntegral <$> count [ ExamRegistrationOccurrence ==. Just occId, ExamRegistrationExam ==. eid ]
|
||||
-- Nothing means unlimited size
|
||||
whenIsJust examOccurrenceCapacity $ \capacity ->
|
||||
registered <- $cachedHereBinary occId . lift $ fromIntegral <$> count [ ExamRegistrationOccurrence ==. Just occId, ExamRegistrationExam ==. eid ]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user