tested and fixed
This commit is contained in:
@@ -1081,7 +1081,7 @@ def strava_webhook_view(request):
|
|||||||
f.write('KeyError line 10576')
|
f.write('KeyError line 10576')
|
||||||
return HttpResponse(status=200)
|
return HttpResponse(status=200)
|
||||||
try:
|
try:
|
||||||
w = Workout.objects.get(id=stravaid)
|
w = Workout.objects.get(uploadedtostrava=stravaid)
|
||||||
except Workout.DoesNotExist:
|
except Workout.DoesNotExist:
|
||||||
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
|
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
|
||||||
with open('strava_webhooks.log','a') as f:
|
with open('strava_webhooks.log','a') as f:
|
||||||
@@ -1100,8 +1100,8 @@ def strava_webhook_view(request):
|
|||||||
f.write(' ')
|
f.write(' ')
|
||||||
f.write('Rower not found')
|
f.write('Rower not found')
|
||||||
return HttpResponse(status=200)
|
return HttpResponse(status=200)
|
||||||
|
print(updates)
|
||||||
for key, value in updates:
|
for key, value in updates.items():
|
||||||
if key == 'title':
|
if key == 'title':
|
||||||
w.name = value
|
w.name = value
|
||||||
w.save()
|
w.save()
|
||||||
|
|||||||
Reference in New Issue
Block a user