X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4bff37c73cb3e5035954af699a2c52065c993197..af339a5c1a69ec22a6f1d5940cde313953948368:/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):