Private
Public Access
1
0

running tests, fixed issues

This commit is contained in:
2024-03-27 07:14:34 +01:00
parent d00d41c09f
commit cccb0be36c
3 changed files with 8 additions and 4 deletions

View File

@@ -4175,10 +4175,16 @@ def interactive_multiple_compare_chart(ids, xparam, yparam, plottype='line',
compute=compute, compute=compute,
workstrokesonly=workstrokesonly, for_chart=True) workstrokesonly=workstrokesonly, for_chart=True)
# check if dataframe not empty
if datadf.empty: # pragma: no cover
return ['<p>No non-zero data in selection</p>', '']
datadf['workoutid'] = datadf['workoutid'].astype(int) datadf['workoutid'] = datadf['workoutid'].astype(int)
datadf.dropna(axis=1, how='all', inplace=True) datadf.dropna(axis=1, how='all', inplace=True)
datadf.dropna(axis=0, how='all', inplace=True) datadf.dropna(axis=0, how='all', inplace=True)
nrworkouts = len(ids) nrworkouts = len(ids)
try: try:
@@ -4187,11 +4193,11 @@ def interactive_multiple_compare_chart(ids, xparam, yparam, plottype='line',
try: try:
tseconds = datadf.loc[:, xparam] tseconds = datadf.loc[:, xparam]
except: except:
return ['', '<p>A chart data error occurred</p>', '', 'A chart data error occurred'] return ['<p>A chart data error occurred</p>', '']
# check if dataframe not empty # check if dataframe not empty
if datadf.empty: # pragma: no cover if datadf.empty: # pragma: no cover
return ['', '<p>No non-zero data in selection</p>', '', 'No non-zero data in selection'] return ['<p>No non-zero data in selection</p>', '']
if (xparam == 'time'): if (xparam == 'time'):

Binary file not shown.

View File

@@ -1801,8 +1801,6 @@ def virtualevent_compare_view(request, id=0):
promember=promember, promember=promember,
plottype=plottype, plottype=plottype,
labeldict=labeldict, startenddict=startenddict) labeldict=labeldict, startenddict=startenddict)
script = res[0]
div = res[1]
breadcrumbs = [ breadcrumbs = [
{ {