diff --git a/rowers/templates/panel_notes.html b/rowers/templates/panel_notes.html index fb6cd880..b1d4520f 100644 --- a/rowers/templates/panel_notes.html +++ b/rowers/templates/panel_notes.html @@ -1,6 +1,6 @@

Notes

- {{ workout.notes }} + {{ workout.notes|linebreaks }}

diff --git a/rowers/templates/rankings.html b/rowers/templates/rankings.html index db4f9d7a..2102954b 100644 --- a/rowers/templates/rankings.html +++ b/rowers/templates/rankings.html @@ -57,7 +57,7 @@ {% else %} diff --git a/rowers/views.py b/rowers/views.py index 2c565621..049decfd 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -12065,9 +12065,18 @@ def plannedsession_create_view(request,timeperiod='thisweek',rowerid=0): return HttpResponseRedirect(url) else: if 'fstartdate' in request.session: - fstartdate = arrow.get(request.session['fstartdate']).date() - fenddate = arrow.get(request.session['fenddate']).date() - fprefdate = arrow.get(request.session['fprefdate']).date() + try: + fstartdate = arrow.get(request.session['fstartdate']).date() + except KeyError: + fastartdate = timezone.now().date() + try: + fenddate = arrow.get(request.session['fenddate']).date() + except KeyError: + fenddate = timezone.now().date() + try: + fprefdate = arrow.get(request.session['fprefdate']).date() + except KeyError: + fprefdate = timezone.now().date() forminitial = { 'startdate':fstartdate, @@ -12702,8 +12711,8 @@ def plannedsession_clone_view(request,id=0,rowerid=0, deltadays = ps.enddate-ps.startdate - ps.startdate = timezone.now() - ps.enddate = timezone.now()+deltadays + ps.startdate = timezone.now().date() + ps.enddate = (timezone.now()+deltadays).date() ps.name += ' (copy)' ps.save()