SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit b2d53b70 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Merge branch 'dev_GK_20230707_publication_draft_edit_form' into 'master'

Force publication citation recalculation on save

See merge request !53
parents d7f45ba5 16971158
No related branches found
No related tags found
1 merge request!53Force publication citation recalculation on save
...@@ -542,6 +542,8 @@ class DraftPublicationForm(forms.ModelForm): ...@@ -542,6 +542,8 @@ class DraftPublicationForm(forms.ModelForm):
do_prefill = False do_prefill = False
if not self.instance.id: if not self.instance.id:
do_prefill = True do_prefill = True
# Set the cf_citation to empty string to force recalculation
self.instance.cf_citation = ""
super().save(*args, **kwargs) super().save(*args, **kwargs)
if do_prefill: if do_prefill:
self.first_time_fill() self.first_time_fill()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment