From c26ff15f8b383374938fbe0fb2775b1679296bf2 Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Mon, 6 Jul 2020 11:52:48 +0200
Subject: [PATCH] Correct withdraw manuscript form save. Fixes SCIPOST-HT

---
 submissions/forms.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/submissions/forms.py b/submissions/forms.py
index bd8f69373..f240a45c2 100644
--- a/submissions/forms.py
+++ b/submissions/forms.py
@@ -827,8 +827,10 @@ class WithdrawSubmissionForm(forms.Form):
 
             # Update editorial decision
             if EditorialDecision.objects.filter(submission=self.submission).exists():
-                EditorialDecision.objects.filter(submission=self.submission).latest_version().update(
-                    status=EditorialDecision.PUBOFFER_REFUSED_BY_AUTHORS)
+                decision = EditorialDecision.objects.filter(
+                    submission=self.submission).latest_version()
+                decision.status = EditorialDecision.PUBOFFER_REFUSED_BY_AUTHORS
+                decision.save()
 
             # Delete any production stream
             if hasattr(self.submission, 'production_stream'):
-- 
GitLab