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

Remove the NEW_DETERMINATION message type

parent 77f01ac9
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,6 @@ class MESSAGES(Enum): ...@@ -16,7 +16,6 @@ class MESSAGES(Enum):
UPDATE_LEAD = 'update_lead' UPDATE_LEAD = 'update_lead'
NEW_SUBMISSION = 'new_submission' NEW_SUBMISSION = 'new_submission'
TRANSITION = 'transition' TRANSITION = 'transition'
NEW_DETERMINATION = 'new_determination'
DETERMINATION_OUTCOME = 'determination_outcome' DETERMINATION_OUTCOME = 'determination_outcome'
INVITED_TO_PROPOSAL = 'invited_to_proposal' INVITED_TO_PROPOSAL = 'invited_to_proposal'
REVIEWERS_UPDATED = 'reviewers_updated' REVIEWERS_UPDATED = 'reviewers_updated'
...@@ -64,7 +63,6 @@ class ActivityAdapter(AdapterBase): ...@@ -64,7 +63,6 @@ class ActivityAdapter(AdapterBase):
MESSAGES.TRANSITION: 'Progressed from {old_phase.display_name} to {submission.phase}', MESSAGES.TRANSITION: 'Progressed from {old_phase.display_name} to {submission.phase}',
MESSAGES.NEW_SUBMISSION: 'Submitted {submission.title} for {submission.page.title}', MESSAGES.NEW_SUBMISSION: 'Submitted {submission.title} for {submission.page.title}',
MESSAGES.UPDATE_LEAD: 'Lead changed from {old.lead} to {submission.lead}', MESSAGES.UPDATE_LEAD: 'Lead changed from {old.lead} to {submission.lead}',
MESSAGES.NEW_DETERMINATION: 'Created a determination for {submission.title}',
MESSAGES.DETERMINATION_OUTCOME: 'Sent a {submission.determination.get_outcome_display} determination for {submission.title}:\r\n{submission.determination.clean_message}', MESSAGES.DETERMINATION_OUTCOME: 'Sent a {submission.determination.get_outcome_display} determination for {submission.title}:\r\n{submission.determination.clean_message}',
MESSAGES.INVITED_TO_PROPOSAL: '{submission.title} has been invited to submit a proposal.', MESSAGES.INVITED_TO_PROPOSAL: '{submission.title} has been invited to submit a proposal.',
MESSAGES.REVIEWERS_UPDATED: 'reviewers_updated', MESSAGES.REVIEWERS_UPDATED: 'reviewers_updated',
......
...@@ -74,8 +74,6 @@ class DeterminationCreateOrUpdateView(CreateOrUpdateView): ...@@ -74,8 +74,6 @@ class DeterminationCreateOrUpdateView(CreateOrUpdateView):
return self.submission.get_absolute_url() return self.submission.get_absolute_url()
def form_valid(self, form): def form_valid(self, form):
is_new = not form.instance.id
response = super().form_valid(form) response = super().form_valid(form)
if not self.object.is_draft: if not self.object.is_draft:
...@@ -88,14 +86,6 @@ class DeterminationCreateOrUpdateView(CreateOrUpdateView): ...@@ -88,14 +86,6 @@ class DeterminationCreateOrUpdateView(CreateOrUpdateView):
action_name = self.get_action_name_from_determination(int(form.cleaned_data.get('outcome'))) action_name = self.get_action_name_from_determination(int(form.cleaned_data.get('outcome')))
self.submission.perform_transition(action_name, self.request.user, request=self.request) self.submission.perform_transition(action_name, self.request.user, request=self.request)
elif is_new:
messenger(
MESSAGES.NEW_DETERMINATION,
request=self.request,
user=self.object.author,
submission=self.object.submission,
)
return self.progress_stage(self.submission) or response return self.progress_stage(self.submission) or response
def progress_stage(self, instance): def progress_stage(self, instance):
......
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