X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4bff37c73cb3e5035954af699a2c52065c993197..bde2a16ae2669bea94ec0f23c60213a26d4881f4:/src/newsletter/forms.py diff --git a/src/newsletter/forms.py b/src/newsletter/forms.py index 16f216e31..fc1e4e316 100644 --- a/src/newsletter/forms.py +++ b/src/newsletter/forms.py @@ -30,9 +30,10 @@ Więcej informacji w polit def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Move the newsletter field to the end. - f = self.fields['agree_newsletter'] - del self.fields['agree_newsletter'] - self.fields['agree_newsletter'] = f + if 'agree_newsletter' in self.fields: + f = self.fields['agree_newsletter'] + del self.fields['agree_newsletter'] + self.fields['agree_newsletter'] = f @property def data_processing(self):