From ed700a34295525cb760d3afa975238171fbaeda5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 4 Oct 2019 20:22:43 +0200 Subject: [PATCH] fix(allocation): fix allocation-results notifications --- src/Jobs/Handler/SendNotification/Allocation.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Jobs/Handler/SendNotification/Allocation.hs b/src/Jobs/Handler/SendNotification/Allocation.hs index 02ce0779c..914fb05db 100644 --- a/src/Jobs/Handler/SendNotification/Allocation.hs +++ b/src/Jobs/Handler/SendNotification/Allocation.hs @@ -179,9 +179,11 @@ dispatchNotificationAllocationResults nAllocation jRecipient = userMailT jRecipi doParticipantResults <- E.selectExists . E.from $ \application -> E.where_ $ application E.^. CourseApplicationAllocation E.==. E.just (E.val nAllocation) + E.&&. application E.^. CourseApplicationUser E.==. E.val jRecipient participantResults' <- E.select . E.from $ \(participant `E.InnerJoin` course) -> do E.on $ participant E.^. CourseParticipantCourse E.==. course E.^. CourseId E.where_ $ participant E.^. CourseParticipantAllocated E.==. E.just (E.val nAllocation) + E.&&. participant E.^. CourseParticipantUser E.==. E.val jRecipient return course let participantResults = case participantResults' of [] | doParticipantResults -> Just []