X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4bff37c73cb3e5035954af699a2c52065c993197..7b8667f75ce0d04e5c6accec9ecff8f621abf26a:/src/newsletter/forms.py?ds=sidebyside 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):