Private
Public Access
1
0

preventing double uploads

This commit is contained in:
Sander Roosendaal
2020-07-13 21:10:54 +02:00
parent 616d7989c2
commit 1de9ed2f09

View File

@@ -1067,8 +1067,9 @@ def strava_webhook_view(request):
f.write(' ')
f.write('Rower not found')
return HttpResponse(status=200)
job = stravastuff.async_get_workout(r.user,stravaid)
ws = Workout.objects.filter(uploadedtostrava=stravaid)
if ws.count()==0:
job = stravastuff.async_get_workout(r.user,stravaid)
elif aspect_type == 'update':
try:
updates = data['updates']