Private
Public Access
1
0

no consistency checks on data fusion

This commit is contained in:
Sander Roosendaal
2017-06-01 16:19:56 +02:00
parent cc57eb2b82
commit 79ab50e29a

View File

@@ -398,7 +398,8 @@ def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
notes='',totaldist=0,totaltime=0,
summary='',
makeprivate=False,
oarlength=2.89,inboard=0.88):
oarlength=2.89,inboard=0.88,
consistencychecks=True):
message = None
powerperc = 100*np.array([r.pw_ut2,
r.pw_ut1,
@@ -417,9 +418,12 @@ def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
for key,value in checks.iteritems():
if not value:
allchecks = 0
a_messages.error(r.user,'Failed consistency check: '+key+', autocorrected')
if consistencychecks:
a_messages.error(r.user,'Failed consistency check: '+key+', autocorrected')
else:
a_messages.error(r.user,'Failed consistency check: '+key+', not corrected')
if not allchecks:
if not allchecks and consistencychecks:
row.repair()
@@ -780,7 +784,8 @@ def new_workout_from_df(r,df,
oarlength=oarlength,
inboard=inboard,
makeprivate=makeprivate,
dosmooth=False)
dosmooth=False,
consistencychecks=False)
return (id,message)