1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2024-11-26 20:47:10 +00:00

Remove (AUT) fields from titles

This commit is contained in:
Yohann D'ANELLO 2020-02-10 18:23:13 +01:00
parent 47ce447aad
commit 92dc21f014

View File

@ -99,6 +99,10 @@ class MediaAdminForm(ModelForm):
# Try with OpenLibrary # Try with OpenLibrary
self.download_data_openlibrary(isbn) self.download_data_openlibrary(isbn)
if self.cleaned_data['title']:
self.cleaned_data['title'] = re.sub('\(AUT\) ',
'', self.cleaned_data['title'])
if self.cleaned_data['authors']: if self.cleaned_data['authors']:
authors = self.cleaned_data['authors'] authors = self.cleaned_data['authors']
old_authors = authors.copy() old_authors = authors.copy()