fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Layout fixes
[wolnelektury.git]
/
src
/
club
/
forms.py
diff --git
a/src/club/forms.py
b/src/club/forms.py
index
5c2d301
..
098a70e
100644
(file)
--- 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()
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 = {}