consistency check for distance/velocity
This commit is contained in:
@@ -131,6 +131,17 @@ def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
|
||||
hrtr=r.tr,hran=r.an,ftp=r.ftp,
|
||||
powerperc=powerperc,powerzones=r.powerzones)
|
||||
row = rdata(f2,rower=rr)
|
||||
|
||||
checks = row.check_consistency()
|
||||
allchecks = 1
|
||||
for key,value in checks.iteritems():
|
||||
if not value:
|
||||
allchecks = 0
|
||||
|
||||
if not allchecks:
|
||||
row.repair()
|
||||
|
||||
|
||||
if row == 0:
|
||||
return (0,'Error: CSV data file not found')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user