X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/811c2c30277f11cc7a35a347a74e4112f97569ac..6dc65dcaa0245bfb27f1a857016b8c25f8214557:/src/club/forms.py?ds=sidebyside diff --git a/src/club/forms.py b/src/club/forms.py index 5c2d3018f..098a70edf 100644 --- a/src/club/forms.py +++ b/src/club/forms.py @@ -138,7 +138,8 @@ class DonationStep1Form(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) club = models.Club.objects.first() - self.fields['custom_amount'].widget.attrs['min'] = club.min_amount + if club is not None: + self.fields['custom_amount'].widget.attrs['min'] = club.min_amount def clean(self): state = {}