Private
Public Access
1
0

bug fixes

This commit is contained in:
Sander Roosendaal
2023-01-21 09:31:26 +01:00
parent 552b6d5298
commit 7ccebc7a98
2 changed files with 10 additions and 1 deletions

View File

@@ -4193,6 +4193,13 @@ class WorkoutForm(ModelForm):
else:
del self.fields['plannedsession']
def clean(self):
if any(self.errors):
return
cd = self.cleaned_data
if cd['duration'] is None or cd['duration'] == '':
raise forms.ValidationError('Duration cannot be empty')
# Used for the rowing physics calculations