fix(allocation): fix allocation-results notifications
This commit is contained in:
parent
dfbbf939e5
commit
ed700a3429
@ -179,9 +179,11 @@ dispatchNotificationAllocationResults nAllocation jRecipient = userMailT jRecipi
|
|||||||
|
|
||||||
doParticipantResults <- E.selectExists . E.from $ \application ->
|
doParticipantResults <- E.selectExists . E.from $ \application ->
|
||||||
E.where_ $ application E.^. CourseApplicationAllocation E.==. E.just (E.val nAllocation)
|
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
|
participantResults' <- E.select . E.from $ \(participant `E.InnerJoin` course) -> do
|
||||||
E.on $ participant E.^. CourseParticipantCourse E.==. course E.^. CourseId
|
E.on $ participant E.^. CourseParticipantCourse E.==. course E.^. CourseId
|
||||||
E.where_ $ participant E.^. CourseParticipantAllocated E.==. E.just (E.val nAllocation)
|
E.where_ $ participant E.^. CourseParticipantAllocated E.==. E.just (E.val nAllocation)
|
||||||
|
E.&&. participant E.^. CourseParticipantUser E.==. E.val jRecipient
|
||||||
return course
|
return course
|
||||||
let participantResults = case participantResults' of
|
let participantResults = case participantResults' of
|
||||||
[] | doParticipantResults -> Just []
|
[] | doParticipantResults -> Just []
|
||||||
|
|||||||
Reference in New Issue
Block a user