From 5b8678188163716722c04f128af0d99ec9cf27a0 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Tue, 11 Feb 2020 21:12:00 +0100 Subject: [PATCH] Fix indentation --- media/forms.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/media/forms.py b/media/forms.py index 673d513..b3c3775 100644 --- a/media/forms.py +++ b/media/forms.py @@ -103,8 +103,11 @@ class MediaAdminForm(ModelForm): self.download_data_openlibrary(isbn) if self.cleaned_data['title']: - self.cleaned_data['title'] = re.sub(r'\(AUT\) ', - '', self.cleaned_data['title']) + self.cleaned_data['title'] = re.sub( + r'\(AUT\) ', + '', + self.cleaned_data['title'] + ) if self.cleaned_data['authors']: authors = self.cleaned_data['authors'] @@ -131,12 +134,18 @@ class MediaAdminForm(ModelForm): title_normalized.replace(' ', ''), ) if self.cleaned_data['subtitle']: - self.cleaned_data['subtitle'] = re.sub(r'', - '', self.cleaned_data['subtitle']) - self.cleaned_data['subtitle'] = re.sub(r'', - '', self.cleaned_data['subtitle']) + self.cleaned_data['subtitle'] = re.sub( + r'', + '', + self.cleaned_data['subtitle'] + ) + self.cleaned_data['subtitle'] = re.sub( + r'', + '', + self.cleaned_data['subtitle'] + ) start = self.cleaned_data['subtitle'].split(' ')[0] \ - .replace('.', '') + .replace('.', '') if start.isnumeric(): side_identifier += " {:0>2}".format(start, )