From 0baa3325c2e39112dd10507e7adde98a8392eb1e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Aug 2020 11:53:24 +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 37024a169..e378500eb 100644 --- a/src/Utils/Course.hs +++ b/src/Utils/Course.hs @@ -121,7 +121,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.val False) (\visibleFrom -> visibleFrom E.<=. E.val now) (course E.^. CourseVisibleFrom) + (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.||. courseAllocationRegistrationOpen now (course E.^. CourseId) maid