From f74f316574e0e6de759c5c0bc6bc70958c3baae5 Mon Sep 17 00:00:00 2001
From: Vaibhav Mule <vaibhavmule135@gmail.com>
Date: Wed, 20 May 2020 17:53:07 +0530
Subject: [PATCH] fix notificafion for editing draft submission

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

diff --git a/hypha/apply/funds/views.py b/hypha/apply/funds/views.py
index 4ff4ce0ca..a4d03f77d 100644
--- a/hypha/apply/funds/views.py
+++ b/hypha/apply/funds/views.py
@@ -940,7 +940,7 @@ class ApplicantSubmissionEditView(BaseSubmissionEditView):
                 user=self.request.user,
                 source=self.object,
             )
-        elif revision:
+        elif revision and not self.object.status == DRAFT_STATE:
             messenger(
                 MESSAGES.APPLICANT_EDIT,
                 request=self.request,
@@ -959,7 +959,7 @@ class ApplicantSubmissionEditView(BaseSubmissionEditView):
                 transition.target,
                 self.request.user,
                 request=self.request,
-                notify=not (revision or submitting_proposal),  # Use the other notification
+                notify=not (revision or submitting_proposal) or self.object.status == DRAFT_STATE,  # Use the other notification
             )
 
         return HttpResponseRedirect(self.get_success_url())
-- 
GitLab