len to count
This commit is contained in:
@@ -1083,7 +1083,7 @@ def strava_webhook_view(request):
|
|||||||
return HttpResponse(status=200)
|
return HttpResponse(status=200)
|
||||||
try:
|
try:
|
||||||
ws = Workout.objects.filter(uploadedtostrava=stravaid)
|
ws = Workout.objects.filter(uploadedtostrava=stravaid)
|
||||||
if len(ws) == 0:
|
if ws.count() == 0:
|
||||||
return HttpResponse(status=200)
|
return HttpResponse(status=200)
|
||||||
except Workout.DoesNotExist:
|
except Workout.DoesNotExist:
|
||||||
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
|
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
|
||||||
|
|||||||
Reference in New Issue
Block a user