Private
Public Access
1
0

check for coordinates in mail processing

This commit is contained in:
Sander Roosendaal
2017-02-13 19:33:15 +01:00
parent 03eaea4008
commit 86b5b88d93

View File

@@ -210,6 +210,14 @@ def make_new_workout_from_email(rr,f2,name,cntr=0):
timestr = time.strftime("%Y%m%d-%H%M%S")
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)
dosummary = (fileformat != 'fit')