fix bug
This commit is contained in:
@@ -2064,16 +2064,19 @@ def leaflet_chart(lat,lon,name=""):
|
|||||||
def leaflet_chart_compare(course,workoutids,labeldict={},startenddict={}):
|
def leaflet_chart_compare(course,workoutids,labeldict={},startenddict={}):
|
||||||
data = []
|
data = []
|
||||||
for id in workoutids:
|
for id in workoutids:
|
||||||
w = Workout.objects.get(id=id)
|
try:
|
||||||
rowdata = rdata(w.csvfilename)
|
w = Workout.objects.get(id=id)
|
||||||
time = rowdata.df['TimeStamp (sec)']
|
rowdata = rdata(w.csvfilename)
|
||||||
df = pd.DataFrame({
|
time = rowdata.df['TimeStamp (sec)']
|
||||||
'workoutid':id,
|
df = pd.DataFrame({
|
||||||
'lat':rowdata.df[' latitude'],
|
'workoutid':id,
|
||||||
'lon':rowdata.df[' longitude'],
|
'lat':rowdata.df[' latitude'],
|
||||||
'time':time-time[0],
|
'lon':rowdata.df[' longitude'],
|
||||||
})
|
'time':time-time[0],
|
||||||
data.append(df)
|
})
|
||||||
|
data.append(df)
|
||||||
|
except Workout.DoesNotExist:
|
||||||
|
pass
|
||||||
|
|
||||||
df = pd.concat(data,axis=0)
|
df = pd.concat(data,axis=0)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user