Merge branch 'release/v18.8.11'
This commit is contained in:
@@ -270,20 +270,27 @@ def analysis_new(request,
|
|||||||
|
|
||||||
savedata = options.get('savedata',False)
|
savedata = options.get('savedata',False)
|
||||||
if savedata:
|
if savedata:
|
||||||
|
ids = options.get('ids',[])
|
||||||
|
tw = []
|
||||||
|
for id in ids:
|
||||||
|
try:
|
||||||
|
tw.append(Workout.objects.get(id=id))
|
||||||
|
except Workout.DoesNotExist:
|
||||||
|
pass
|
||||||
df = pd.DataFrame()
|
df = pd.DataFrame()
|
||||||
function = options.get('function','')
|
function = options.get('function','')
|
||||||
if function == 'boxplot':
|
if function == 'boxplot':
|
||||||
df = boxplotdata(workouts, options)
|
df = boxplotdata(tw, options)
|
||||||
elif function == 'trendflex': # pragma: no cover
|
elif function == 'trendflex': # pragma: no cover
|
||||||
df = trendflexdata(workouts, options, userid=userid)
|
df = trendflexdata(tw, options, userid=userid)
|
||||||
elif function == 'histo': # pragma: no cover
|
elif function == 'histo': # pragma: no cover
|
||||||
df = histodata(workouts, options)
|
df = histodata(tw, options)
|
||||||
elif function == 'flexall': # pragma: no cover
|
elif function == 'flexall': # pragma: no cover
|
||||||
df = flexalldata(workouts, options)
|
df = flexalldata(tw, options)
|
||||||
elif function == 'compare': # pragma: no cover
|
elif function == 'compare': # pragma: no cover
|
||||||
df = comparisondata(workouts, options)
|
df = comparisondata(tw, options)
|
||||||
elif function == 'cp': # pragma: no cover
|
elif function == 'cp': # pragma: no cover
|
||||||
df = cpdata(workouts, options)
|
df = cpdata(tw, options)
|
||||||
options['savedata'] = False
|
options['savedata'] = False
|
||||||
request.session['options'] = options
|
request.session['options'] = options
|
||||||
response = HttpResponse(df.to_csv())
|
response = HttpResponse(df.to_csv())
|
||||||
|
|||||||
Reference in New Issue
Block a user