From 3c93b270cb96afc99067410c9f6e920ce458b3c1 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sat, 5 Oct 2019 15:17:45 +0200 Subject: [PATCH] some bug fixes --- rowers/interactiveplots.py | 2 +- rowers/views/planviews.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 5148a698..c2e921db 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -249,7 +249,7 @@ def interactive_planchart(data,startdate,enddate): yrange1 = Range1d(start=0,end=1.1*yaxmaximum) - tidy_df = data.melt(id_vars=['startdate'],value_vars=['planned','executed']) + tidy_df = data.melt(id_vars=['startdate'],value_vars=['executed','planned']) bars = hv.Bars(tidy_df,['startdate','variable'],['value']) bars.opts( opts.Bars(show_legend=True,tools=['tap','hover'],legend_position='bottom',show_frame=True)) diff --git a/rowers/views/planviews.py b/rowers/views/planviews.py index 6bb9aad5..4809c0fe 100644 --- a/rowers/views/planviews.py +++ b/rowers/views/planviews.py @@ -2352,8 +2352,11 @@ def rower_trainingplan_execution_view(request, raise PermissionDenied("Access denied") if not startdate or not enddate: - startdate = plan.startdate - enddate = plan.enddate + if int(id): + startdate = plan.startdate + enddate = plan.enddate + else: + startdate,enddate = get_dates_timeperiod(request) else: startdate,enddate = get_dates_timeperiod(request)