From 169711589ae085be0268a61a7a5b50e251df300d Mon Sep 17 00:00:00 2001
From: George Katsikas <giorgakis.katsikas@gmail.com>
Date: Fri, 7 Jul 2023 11:37:09 +0200
Subject: [PATCH] force publication citation recalculation on save

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

diff --git a/scipost_django/journals/forms.py b/scipost_django/journals/forms.py
index 226e63c55..1e91e33da 100644
--- a/scipost_django/journals/forms.py
+++ b/scipost_django/journals/forms.py
@@ -542,6 +542,8 @@ class DraftPublicationForm(forms.ModelForm):
         do_prefill = False
         if not self.instance.id:
             do_prefill = True
+        # Set the cf_citation to empty string to force recalculation
+        self.instance.cf_citation = ""
         super().save(*args, **kwargs)
         if do_prefill:
             self.first_time_fill()
-- 
GitLab