From 078e80919b7631157a97b33cd16364b02e8336d6 Mon Sep 17 00:00:00 2001 From: George Katsikas <giorgakis.katsikas@gmail.com> Date: Mon, 10 Jul 2023 18:06:56 +0200 Subject: [PATCH] make EIC vote in favor of their own recommendation --- scipost_django/submissions/forms/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scipost_django/submissions/forms/__init__.py b/scipost_django/submissions/forms/__init__.py index ec8678207..32ab36d20 100644 --- a/scipost_django/submissions/forms/__init__.py +++ b/scipost_django/submissions/forms/__init__.py @@ -2701,6 +2701,14 @@ class EICRecommendationForm(forms.ModelForm): recommendation.save() + # The EIC should vote in favour of their own recommendation + # This should be done after the recommendation is saved, so that the + # id is determined for use in the ManyToMany relation. + # Tiering has already been created above, and no special objects are required + # in the event of submission rejection. + recommendation.voted_for.add(self.submission.editor_in_charge) + recommendation.save() + return recommendation def revision_requested(self): -- GitLab