Merge branch 'release/v13.43'
This commit is contained in:
@@ -608,7 +608,7 @@ def handle_check_race_course(self,
|
||||
f.write(b'--- LOG of all gate times---')
|
||||
|
||||
for path,polygon in zip(paths,polygons):
|
||||
( secs,meters,completed) = coursetime_paths(rowdata2,
|
||||
( secs,meters,completed) = coursetime_paths(rowdata,
|
||||
[path],polygons=[polygon],logfile=logfile)
|
||||
with open(logfile,'ab') as f:
|
||||
line = " time: {t} seconds, distance: {m} meters".format(t=secs,m=meters)
|
||||
|
||||
@@ -1082,7 +1082,9 @@ def strava_webhook_view(request):
|
||||
f.write('KeyError line 10576')
|
||||
return HttpResponse(status=200)
|
||||
try:
|
||||
w = Workout.objects.get(uploadedtostrava=stravaid)
|
||||
ws = Workout.objects.filter(uploadedtostrava=stravaid)
|
||||
if len(ws) == 0:
|
||||
return HttpResponse(status=200)
|
||||
except Workout.DoesNotExist:
|
||||
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
|
||||
with open('strava_webhooks.log','a') as f:
|
||||
@@ -1101,22 +1103,22 @@ def strava_webhook_view(request):
|
||||
f.write(' ')
|
||||
f.write('Rower not found')
|
||||
return HttpResponse(status=200)
|
||||
print(updates)
|
||||
for key, value in updates.items():
|
||||
if key == 'title':
|
||||
w.name = value
|
||||
w.save()
|
||||
if key == 'type':
|
||||
try:
|
||||
w.workouttype = mytypes.stravamappinginv[value]
|
||||
for w in ws:
|
||||
if key == 'title':
|
||||
w.name = value
|
||||
w.save()
|
||||
except KeyError:
|
||||
with open('strava_webhooks.log','a') as f:
|
||||
f.write('\n')
|
||||
f.write(timestamp)
|
||||
f.write(' ')
|
||||
f.write('Workout type not found: '+str(value))
|
||||
return HttpResponse(status=200)
|
||||
if key == 'type':
|
||||
try:
|
||||
w.workouttype = mytypes.stravamappinginv[value]
|
||||
w.save()
|
||||
except KeyError:
|
||||
with open('strava_webhooks.log','a') as f:
|
||||
f.write('\n')
|
||||
f.write(timestamp)
|
||||
f.write(' ')
|
||||
f.write('Workout type not found: '+str(value))
|
||||
return HttpResponse(status=200)
|
||||
|
||||
return HttpResponse(status=200)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user