Private
Public Access
1
0

fixing step editor

This commit is contained in:
2025-01-22 20:50:02 +01:00
parent 95bc02e122
commit 7190d97d29
3 changed files with 6 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ def download_fit(request, filename=''):
try:
response = HttpResponse(fitfile)
except FileNotFoundError:
print(fitfile, "not found")
raise Http404("File not found")
response['Content-Disposition'] = 'attachment; filename="%s"' % filename # pragma: no cover

View File

@@ -3204,7 +3204,7 @@ def stepedit(request, id=0, psid=0):
if form.cleaned_data['durationtype'] == 'Time':
ss['durationValue'] = form.cleaned_data['durationvalue']*60000
elif form.cleaned_data['durationtype'] == 'Distance':
ss[durationValue] = form.cleaned_data['durationvalue']*100
ss['durationValue'] = form.cleaned_data['durationvalue']*100
ss['durationValue'] = int(ss['durationValue'])
ps.fitfile = None