From 8dbf0494c2fabedc252741b2ef2a31aaba10ed83 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 10 Feb 2020 16:48:57 +0100 Subject: [PATCH] The last name of the author is considered for the side identifier --- media/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/forms.py b/media/forms.py index a9fe699..7586c5e 100644 --- a/media/forms.py +++ b/media/forms.py @@ -101,7 +101,7 @@ class MediaAdminForm(ModelForm): if self.cleaned_data['authors']: author_name = self.cleaned_data['authors'][0].name if ',' not in author_name and ' ' in author_name: - author_name = author_name.split(' ')[1] + author_name = author_name.split(' ')[-1] side_identifier = "{:.3} {:.3}".format( author_name, self.cleaned_data['title'], )