From 8f11f4a53999f6b6cb02ae0e7cc02ba5532c2907 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 9 Aug 2017 14:57:12 +0200 Subject: [PATCH] showing rests strokes if workout only has rest strokes:wq --- rowers/interactiveplots.py | 8 ++++++-- rowers/views.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 82325366..25f5d708 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -1809,7 +1809,11 @@ def interactive_flex_chart2(id=0,promember=0, rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True, workstrokesonly=workstrokesonly) - + if rowdata.empty: + rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True, + workstrokesonly=False) + workstrokesonly=False + try: tests = rowdata[yparam2] except KeyError: @@ -2250,7 +2254,7 @@ def interactive_flex_chart2(id=0,promember=0, js_resources = INLINE.render_js() css_resources = INLINE.render_css() - return [script,div,js_resources,css_resources] + return [script,div,js_resources,css_resources,workstrokesonly] def interactive_bar_chart(id=0,promember=0): diff --git a/rowers/views.py b/rowers/views.py index c93ccd2d..d9abc259 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -5582,7 +5582,7 @@ def workout_flexchart3_view(request,*args,**kwargs): # create interactive plot try: - script,div,js_resources,css_resources = interactive_flex_chart2(id,xparam=xparam,yparam1=yparam1, + script,div,js_resources,css_resources,workstrokesonly = interactive_flex_chart2(id,xparam=xparam,yparam1=yparam1, yparam2=yparam2, promember=promember,plottype=plottype, workstrokesonly=workstrokesonly)