The last name of the author is considered for the side identifier

This commit is contained in:
Yohann D'ANELLO 2020-02-10 16:48:57 +01:00
parent dc23ac0396
commit 8dbf0494c2
1 changed files with 1 additions and 1 deletions

View File

@ -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'], )