X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/9a5e7a1f45c46fbf3509cb660e29806e7ca05a8d..788c99a388fd34de4c159d6a3cefed84291b95f5:/src/club/forms.py diff --git a/src/club/forms.py b/src/club/forms.py index 2ebe4e58d..d0568c023 100644 --- a/src/club/forms.py +++ b/src/club/forms.py @@ -8,7 +8,7 @@ from . import models from .payu.forms import CardTokenForm -class ScheduleForm(NewsletterForm, forms.ModelForm): +class ScheduleForm(forms.ModelForm, NewsletterForm): class Meta: model = models.Schedule fields = ['monthly', 'amount', 'email'] @@ -24,6 +24,10 @@ class ScheduleForm(NewsletterForm, forms.ModelForm): raise forms.ValidationError('Minimalna kwota to %d zł.' % club.min_amount) return value + def save(self, *args, **kwargs): + NewsletterForm.save(self, *args, **kwargs) + return super().save(*args, **kwargs) + class PayUCardTokenForm(CardTokenForm): def get_queryset(self, view):