From 5ea781692671ed60e2851297b7eecd6ce666ec34 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel <> Date: Sat, 8 Aug 2020 15:39:10 +0200 Subject: [PATCH] fix: hlint --- src/Utils/Course.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Utils/Course.hs b/src/Utils/Course.hs index fe2d40aff..ce56d4220 100644 --- a/src/Utils/Course.hs +++ b/src/Utils/Course.hs @@ -95,11 +95,11 @@ isCourseExamCorrector muid AuthTagActive{..} cid = E.exists . E.from $ \(examCor E.&&. E.val (authTagIsActive AuthExamCorrector) isCourseParticipant :: Maybe UserId -> AuthTagActive -> E.SqlExpr (E.Value CourseId) -> E.SqlExpr (E.Value Bool) -isCourseParticipant muid AuthTagActive{..} cid = E.exists . E.from $ \courseParticipant -> do - E.where_ $ 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? +isCourseParticipant muid AuthTagActive{..} cid = E.exists . E.from $ \courseParticipant -> E.where_ $ + 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? 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_ $