Private
Public Access
1
0

bug fix hr preferences form

This commit is contained in:
Sander Roosendaal
2020-03-29 14:02:31 +02:00
parent cace8b7061
commit 4cc87152fe

View File

@@ -3548,7 +3548,7 @@ class RowerForm(ModelForm):
return an
def clean_max(self):
max = self.cleaned_data['max']
max = int(self.cleaned_data['max'])
if max<10:
raise forms.ValidationError("Max heart rate should be higher than 10 bpm")
@@ -3574,7 +3574,7 @@ class RowerForm(ModelForm):
ut2 = self.cleaned_data['ut2']
except:
try:
ut2 = self.data['ut2']
ut2 = int(self.data['ut2'])
except ValueError:
ut2 = 0
@@ -3582,7 +3582,7 @@ class RowerForm(ModelForm):
ut1 = self.cleaned_data['ut1']
except:
try:
ut1 = self.data['ut1']
ut1 = int(self.data['ut1'])
except ValueError:
ut1 = 0
@@ -3590,7 +3590,7 @@ class RowerForm(ModelForm):
at = self.cleaned_data['at']
except:
try:
at = self.data['at']
at = int(self.data['at'])
except ValueError:
at = 0
@@ -3598,7 +3598,7 @@ class RowerForm(ModelForm):
an = self.cleaned_data['an']
except:
try:
an = self.data['an']
int(an = self.data['an'])
except ValueError:
an = 0
@@ -3606,7 +3606,7 @@ class RowerForm(ModelForm):
tr = self.cleaned_data['tr']
except:
try:
tr = self.data['tr']
tr = int(self.data['tr'])
except ValueError:
tr = 0
@@ -3614,7 +3614,7 @@ class RowerForm(ModelForm):
max = self.cleaned_data['max']
except:
try:
max = self.data['max']
max = int(self.data['max'])
except ValueError:
max = 0