1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2024-12-24 17:42:23 +00:00

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

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