fix(submissions): only notify submittors if rating is done

This commit is contained in:
Gregor Kleen 2019-07-17 11:49:19 +02:00
parent a14152d1bc
commit 8e0c379c71

View File

@ -522,7 +522,7 @@ sinkSubmission userId mExists isUpdate = do
mapM_ throwM $ validateRating sheetType r'
when (isNothing submissionRatingTime) $ tellSt mempty { sinkSubmissionNotifyRating = Any True }
when (submissionRatingDone r') $ tellSt mempty { sinkSubmissionNotifyRating = Any True }
lift $ update submissionId
[ SubmissionRatingPoints =. ratingPoints
, SubmissionRatingComment =. ratingComment