From 178a94243b4404b0497ee9be41915967b822fb58 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Mon, 17 Dec 2018 19:45:40 +0100
Subject: [PATCH 1/3] line thickness multi compare chart
---
rowers/interactiveplots.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py
index 7e545525..d1b88a42 100644
--- a/rowers/interactiveplots.py
+++ b/rowers/interactiveplots.py
@@ -3899,7 +3899,7 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
legend=str(id)
if plottype=='line':
- l1.append(plot.line('x','y',source=source,color=color,legend=legend))
+ l1.append(plot.line('x','y',source=source,color=color,legend=legend,line_width=2))
else:
l1.append(plot.scatter('x','y',source=source,color=color,legend=legend,
fill_alpha=0.4,line_color=None))
From 4bfc3c0dfa347b7276a0e8bd9dfde82a4fc1f662 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Mon, 17 Dec 2018 20:08:54 +0100
Subject: [PATCH 2/3] make race submissions public
---
rowers/plannedsessions.py | 11 +++++++++++
rowers/templates/race_submit.html | 6 ++++++
2 files changed, 17 insertions(+)
diff --git a/rowers/plannedsessions.py b/rowers/plannedsessions.py
index a4056bd1..93ba5c37 100644
--- a/rowers/plannedsessions.py
+++ b/rowers/plannedsessions.py
@@ -1047,6 +1047,12 @@ def add_workout_indoorrace(ws,race,r,recordid=0):
record.coursecompleted = True
record.workoutid = ws[0].id
+
+ if ws[0].privacy == 'private':
+ ws[0].privacy = 'visible'
+ ws[0].save()
+ comments.append('Workouts submitted to virtual events have to be public. We have changed the workout to a public workout.')
+
record.save()
add_workouts_plannedsession(ws,race,r)
@@ -1153,6 +1159,11 @@ def add_workout_race(ws,race,r,splitsecond=0,recordid=0):
otherrecord.coursecompleted = False
otherrecord.save()
+ if ws[0].privacy == 'private':
+ ws[0].privacy = 'visible'
+ ws[0].save()
+ comments.append('Workouts submitted to virtual events have to be public. We have changed the workout to a public workout.')
+
job = myqueue(queue,handle_check_race_course,ws[0].csvfilename,
ws[0].id,race.course.id,record.id,splitsecond=splitsecond)
diff --git a/rowers/templates/race_submit.html b/rowers/templates/race_submit.html
index e5e3fdab..9268863b 100644
--- a/rowers/templates/race_submit.html
+++ b/rowers/templates/race_submit.html
@@ -42,6 +42,12 @@
+
+
+ Warning: If you submit a workout that was marked as "private", it will
+ be made public by submitting it as a race result.
+
+
From ee76ce00932b09b0c3a7a62a1edbd7e6a98df860 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Mon, 17 Dec 2018 20:42:29 +0100
Subject: [PATCH 3/3] mock Session not working without net
---
rowers/tests.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rowers/tests.py b/rowers/tests.py
index 9aff5550..b99181c6 100644
--- a/rowers/tests.py
+++ b/rowers/tests.py
@@ -432,7 +432,7 @@ class C2Objects(DjangoTestCase):
@patch('rowers.c2stuff.requests.Session', side_effect=mocked_requests)
- def test_c2_callback(self, mock_post):
+ def test_c2_callback(self, mock_Session):
response = self.c.get('/call_back?code=dsdoij232s',follow=True)