Private
Public Access
1
0

form improvement

This commit is contained in:
Sander Roosendaal
2018-11-27 21:13:41 +01:00
parent 8162b2fc45
commit 1d2e1cb73f

View File

@@ -892,8 +892,11 @@ class RaceResultFilterForm(forms.Form):
self.fields['boatclass'].choices = boatclasschoices
# boattype
theboattypees = [record.boattype for record in records]
theboattypees = list(set(theboattypees))
try:
theboattypees = [record.boattype for record in records]
theboattypees = list(set(theboattypees))
except AttributeError:
theboattypees = []
if len(theboattypees)<= 1:
del self.fields['boattype']