Private
Public Access
1
0

Merge branch 'develop' into feature/braintree

This commit is contained in:
Sander Roosendaal
2018-12-17 20:51:47 +01:00
4 changed files with 19 additions and 2 deletions

View File

@@ -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))

View File

@@ -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)

View File

@@ -42,6 +42,12 @@
<input type="submit" value="Submit">
</p>
</li>
<li class="grid_4">
<p>
Warning: If you submit a workout that was marked as "private", it will
be made public by submitting it as a race result.
</p>
</li>
</ul>

View File

@@ -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)