Private
Public Access
1
0

Merge tag 'v3.20' into develop

bugfix zerodivision error consistency check
This commit is contained in:
Sander Roosendaal
2017-06-21 20:47:22 +02:00

View File

@@ -442,16 +442,18 @@ def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
pass
return new_workout_from_df(r,newdf,
title=title)
checks = row.check_consistency()
allchecks = 1
for key,value in checks.iteritems():
if not value:
allchecks = 0
if consistencychecks:
a_messages.error(r.user,'Failed consistency check: '+key+', autocorrected')
else:
a_messages.error(r.user,'Failed consistency check: '+key+', not corrected')
try:
checks = row.check_consistency()
allchecks = 1
for key,value in checks.iteritems():
if not value:
allchecks = 0
if consistencychecks:
a_messages.error(r.user,'Failed consistency check: '+key+', autocorrected')
else:
a_messages.error(r.user,'Failed consistency check: '+key+', not corrected')
except ZeroDivisionError:
pass
if not allchecks and consistencychecks:
# row.repair()