Apply 1 suggestion(s) to 1 file(s)

This commit is contained in:
Sarah Vaupel 2020-08-10 11:53:07 +02:00
parent d5b7b08f31
commit 18bd29b746

View File

@ -98,7 +98,7 @@ isCourseParticipant muid AuthTagActive{..} cid = E.exists . E.from $ \coursePart
E.just (courseParticipant E.^. CourseParticipantUser) E.==. E.val muid
E.&&. courseParticipant E.^. CourseParticipantCourse E.==. cid
E.&&. courseParticipant E.^. CourseParticipantState E.==. E.val CourseParticipantActive
E.&&. E.val (authTagIsActive AuthCourseRegistered) -- TODO is this the auth tag I want here?
E.&&. E.val (authTagIsActive AuthCourseRegistered)
isCourseApplicant :: Maybe UserId -> AuthTagActive -> E.SqlExpr (E.Value CourseId) -> Maybe (E.SqlExpr (E.Value AllocationId)) -> E.SqlExpr (E.Value Bool)
isCourseApplicant muid AuthTagActive{..} cid maid = E.exists . E.from $ \courseApplication -> E.where_ $