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