Private
Public Access
1
0

tested and fixed

This commit is contained in:
Sander Roosendaal
2020-07-13 20:45:49 +02:00
parent 6b4b8cc4ea
commit 616d7989c2

View File

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