Private
Public Access
1
0

debugging oauth

This commit is contained in:
Sander Roosendaal
2018-03-29 11:22:05 -07:00
parent b134d1cba6
commit cf3a3e227d
4 changed files with 34 additions and 9 deletions

View File

@@ -1586,9 +1586,9 @@ def rdata(file, rower=rrower()):
try:
res = rrdata(csvfile=file + '.gz', rower=rower)
except IOError, IndexError:
res = 0
res = rrdata()
except:
res = 0
res = rrdata()
return res
@@ -1637,7 +1637,7 @@ def getrowdata_db(id=0, doclean=False, convertnewtons=True):
if data.empty:
rowdata, row = getrowdata(id=id)
if rowdata:
if not rowdata.empty:
data = dataprep(rowdata.df, id=id, bands=True,
barchart=True, otwpower=True)
else:
@@ -1645,7 +1645,8 @@ def getrowdata_db(id=0, doclean=False, convertnewtons=True):
else:
row = Workout.objects.get(id=id)
if data['efficiency'].mean() == 0 and data['power'].mean() != 0:
if not data.empty and data['efficiency'].mean() == 0 and data['power'].mean() != 0:
data = add_efficiency(id=id)
if doclean: