From 82e5e43cffee8f92ea539cedc8825e6602fc9348 Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Thu, 23 Aug 2018 15:40:06 +0100
Subject: [PATCH] Turn off the status change notification for submitting
 proposals

---
 opentech/apply/funds/views.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/opentech/apply/funds/views.py b/opentech/apply/funds/views.py
index a506fc889..267bfeaa8 100644
--- a/opentech/apply/funds/views.py
+++ b/opentech/apply/funds/views.py
@@ -82,9 +82,11 @@ class ProgressSubmissionView(DelegatedViewMixin, UpdateView):
                 'apply:submissions:determinations:form',
                 args=(form.instance.id,)) + "?action=" + action)
 
-        self.object.perform_transition(action, self.request.user, request=self.request)
+        submitting_proposal = self.object.phase.name == 'proposal_draft' and action == 'proposal_discussion'
 
-        if self.object.phase.name == 'proposal_discussion' and action == 'proposal_discussion':
+        self.object.perform_transition(action, self.request.user, request=self.request, notify=not submitting_proposal)
+
+        if submitting_proposal:
             messenger(
                 MESSAGES.PROPOSAL_SUBMITTED,
                 request=self.request,
-- 
GitLab