Layout fixes
[wolnelektury.git] / src / club / forms.py
index 5c2d301..098a70e 100644 (file)
@@ -138,7 +138,8 @@ class DonationStep1Form(forms.ModelForm):
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
         club = models.Club.objects.first()
     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 = {}
 
     def clean(self):
         state = {}