Merge branch 'develop' into feature/garmin2
This commit is contained in:
@@ -14,6 +14,7 @@ import pandas as pd
|
||||
import numpy
|
||||
import json
|
||||
from json.decoder import JSONDecodeError
|
||||
from uuid import uuid4
|
||||
|
||||
from rowsandall_app.settings import (
|
||||
GARMIN_CLIENT_KEY, GARMIN_REDIRECT_URI, GARMIN_CLIENT_SECRET
|
||||
@@ -166,7 +167,10 @@ def garmin_getworkout(garminid,r,activity):
|
||||
try:
|
||||
w = Workout.objects.get(uploadedtogarmin=garminid)
|
||||
except Workout.DoesNotExist:
|
||||
newcsvfile='media/garmin{code}_{importid}.csv'
|
||||
newcsvfile='media/garmin{code}_{importid}.csv'.format(
|
||||
code=uuid4().hex[:16],
|
||||
importid=garminid,
|
||||
)
|
||||
w = Workout(user=r,csvfilename=newcsvfile)
|
||||
|
||||
utc_offset = datetime.timedelta(seconds=offset)
|
||||
|
||||
Reference in New Issue
Block a user