Private
Public Access
1
0

adding automatic charting

This commit is contained in:
Sander Roosendaal
2020-11-02 22:06:21 +01:00
parent d542c6a573
commit 71668db9b3
3 changed files with 21 additions and 2 deletions

View File

@@ -245,6 +245,7 @@ def rower_favoritecharts_view(request,userid=0):
r.fastpaceerg = staticchartform.cleaned_data.get('fastpaceerg')
r.slowpaceotw = staticchartform.cleaned_data.get('slowpaceotw')
r.fastpaceotw = staticchartform.cleaned_data.get('fastpaceotw')
r.staticchartonupload = staticchartform.cleaned_data.get('staticchartonupload')
r.save()
if request.method == 'POST' and 'form-TOTAL_FORMS' in request.POST:

View File

@@ -4793,6 +4793,9 @@ def workout_upload_api(request):
if make_plot:
res, jobid = uploads.make_plot(r,w,f1,f2,plottype,t)
elif r.staticchartonupload != 'None':
plottype = r.staticchartonupload
res, jobid = uploads.make_plot(r,w,f1,f2,plottype,t)
uploads.do_sync(w,post_data,quick=True)
@@ -5101,6 +5104,9 @@ def workout_upload_view(request,
request.session['async_tasks'] += [(jobid,'make_plot')]
except KeyError:
request.session['async_tasks'] = [(jobid,'make_plot')]
elif r.staticchartonupload != None:
plottype = r.staticchartonupload
res, jobid = uploads.make_plot(r,w,f1,f2,plottype,t)
# upload to C2
if (upload_to_c2):