Skip to content
Snippets Groups Projects
Commit 4d106680 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Don't send emails to applicants when they wont see a visual change

parent dff49c7a
No related branches found
No related tags found
No related merge requests found
......@@ -302,6 +302,11 @@ class EmailAdapter(AdapterBase):
def recipients(self, message_type, submission, **kwargs):
if message_type == MESSAGES.READY_FOR_REVIEW:
return self.reviewers(submission)
if message_type == MESSAGES.TRANSITION:
# Only notify the applicant if the new phase can be seen within the workflow
if not submission.phase.permissions.can_view(submission.user):
return []
return [submission.user.email]
def reviewers(self, submission):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment