From 0ff69508ced98059ea762b8c5abcedee1f85ac87 Mon Sep 17 00:00:00 2001
From: SwoopDoable <swoop-doable.0v@icloud.com>
Date: Mon, 12 Aug 2024 17:16:47 +0200
Subject: [PATCH] Auto-search for authors once on publication draft creation

---
 scipost_django/journals/forms.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scipost_django/journals/forms.py b/scipost_django/journals/forms.py
index 23ddcf5e2..5dc20c62a 100644
--- a/scipost_django/journals/forms.py
+++ b/scipost_django/journals/forms.py
@@ -724,6 +724,9 @@ class DraftPublicationForm(forms.ModelForm):
         super().save(*args, **kwargs)
         if do_prefill:
             self.first_time_fill()
+            # We cannot trust the author associations ordered in Submission.
+            self.instance.reset_author_associations()
+        
         return self.instance
 
     def first_time_fill(self):
-- 
GitLab