From ff19b4a98d976f3850a1fe9cf07ffa740b4cbf7a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Aug 2020 11:53:55 +0200 Subject: [PATCH] Apply 1 suggestion(s) to 1 file(s) --- src/Utils/Course.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/Course.hs b/src/Utils/Course.hs index e378500eb..79ed0d6c8 100644 --- a/src/Utils/Course.hs +++ b/src/Utils/Course.hs @@ -122,7 +122,7 @@ isCourseAssociated muid ata cid maid = courseIsVisible :: UTCTime -> E.SqlExpr (Entity Course) -> Maybe (E.SqlExpr (E.Value AllocationId)) -> E.SqlExpr (E.Value Bool) courseIsVisible now course maid = (E.maybe E.false (\visibleFrom -> visibleFrom E.<=. E.val now) (course E.^. CourseVisibleFrom) - E.&&. E.maybe (E.val True) (\visibleTo -> E.val now E.<=. visibleTo) (course E.^. CourseVisibleTo) + E.&&. E.maybe E.true (\visibleTo -> E.val now E.<=. visibleTo) (course E.^. CourseVisibleTo) ) E.||. courseAllocationRegistrationOpen now (course E.^. CourseId) maid courseIsVisible' :: UTCTime -> Entity Course -> Maybe AllocationId -> E.SqlExpr (E.Value Bool)