Merge branch 'release/v13.23'
This commit is contained in:
3
garminlog.log
Normal file
3
garminlog.log
Normal file
File diff suppressed because one or more lines are too long
@@ -180,10 +180,8 @@ def garmin_workouts_from_details(activities):
|
|||||||
try:
|
try:
|
||||||
garmintoken = activity['userAccessToken']
|
garmintoken = activity['userAccessToken']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print(activity)
|
|
||||||
return 0
|
return 0
|
||||||
except TypeError:
|
except TypeError:
|
||||||
print(activity)
|
|
||||||
return 0
|
return 0
|
||||||
try:
|
try:
|
||||||
r = Rower.objects.get(garmintoken=garmintoken)
|
r = Rower.objects.get(garmintoken=garmintoken)
|
||||||
|
|||||||
@@ -1049,6 +1049,14 @@ def garmin_details_view(request):
|
|||||||
if request.method != 'POST':
|
if request.method != 'POST':
|
||||||
return HttpResponse(status=200)
|
return HttpResponse(status=200)
|
||||||
|
|
||||||
|
t = time.localtime()
|
||||||
|
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
|
||||||
|
with open('garminlog.log','a') as f:
|
||||||
|
f.write('\n')
|
||||||
|
f.write(timestamp)
|
||||||
|
f.write(' ')
|
||||||
|
f.write(str(request.body))
|
||||||
|
|
||||||
# POST request
|
# POST request
|
||||||
data = json.loads(request.body)
|
data = json.loads(request.body)
|
||||||
result = garmin_stuff.garmin_workouts_from_details(data)
|
result = garmin_stuff.garmin_workouts_from_details(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user