fixes
This commit is contained in:
@@ -353,7 +353,10 @@ def create_async_workout(alldata,user,stravaid,debug=False):
|
||||
from rowers.utils import get_strava_stream
|
||||
|
||||
def async_get_workout(user,stravaid):
|
||||
token = strava_open(user)
|
||||
try:
|
||||
token = strava_open(user)
|
||||
except NoTokenError:
|
||||
return 0
|
||||
csvfilename = 'media/{code}_{stravaid}.csv'.format(code=uuid4().hex[:16],stravaid=stravaid)
|
||||
job = myqueue(queue,
|
||||
fetch_strava_workout,
|
||||
|
||||
@@ -698,8 +698,12 @@ def handle_get_garmin_file(client_id,
|
||||
|
||||
|
||||
regex = '.*\?id=(\d+)'
|
||||
m = re.compile(regex).match(url).group(1)
|
||||
garminid = int(m)
|
||||
try:
|
||||
m = re.compile(regex).match(url).group(1)
|
||||
garminid = int(m)
|
||||
except AttributeError:
|
||||
garminid = ''
|
||||
|
||||
|
||||
garmin = OAuth1Session(client_id,
|
||||
client_secret=client_secret,
|
||||
|
||||
@@ -535,10 +535,11 @@ def do_sync(w,options, quick=False):
|
||||
pass
|
||||
|
||||
try:
|
||||
if options['garmind'] != 0 and options['garminid'] != '':
|
||||
if options['garminid'] != 0 and options['garminid'] != '':
|
||||
w.uploadedtogarmin = options['garminid']
|
||||
w.save()
|
||||
except KeyError:
|
||||
print('keyerror')
|
||||
pass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user