X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/811c2c30277f11cc7a35a347a74e4112f97569ac..67c985af477f2a622a5c3ce81afd7cb424326871:/src/club/forms.py

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 = {}