check for coordinates in mail processing
This commit is contained in:
@@ -210,6 +210,14 @@ def make_new_workout_from_email(rr,f2,name,cntr=0):
|
|||||||
timestr = time.strftime("%Y%m%d-%H%M%S")
|
timestr = time.strftime("%Y%m%d-%H%M%S")
|
||||||
f2 = 'media/'+timestr+str(cntr)+'o.csv'
|
f2 = 'media/'+timestr+str(cntr)+'o.csv'
|
||||||
|
|
||||||
|
try:
|
||||||
|
avglat = rowdata.df[' latitude'].mean()
|
||||||
|
avglon = rowdata.df[' longitude'].mean()
|
||||||
|
if avglat != 0 and avglon != 0:
|
||||||
|
workouttype = 'water'
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
row.write_csv(f2,gzip=True)
|
row.write_csv(f2,gzip=True)
|
||||||
dosummary = (fileformat != 'fit')
|
dosummary = (fileformat != 'fit')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user