Private
Public Access
1
0

values in CP notification email

This commit is contained in:
Sander Roosendaal
2017-07-03 22:07:07 +02:00
parent 4f832235f6
commit cfd6c1da7a
5 changed files with 29 additions and 15 deletions

View File

@@ -428,7 +428,8 @@ def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
isbreakthrough = False
if workouttype == 'water':
delta,cpvalues,avgpower = datautils.getsinglecp(row.df)
if utils.isbreakthrough(delta,cpvalues,r.p0,r.p1,r.p2,r.p3,r.cpratio):
res,btvalues = utils.isbreakthrough(delta,cpvalues,r.p0,r.p1,r.p2,r.p3,r.cpratio)
if res:
isbreakthrough = True
res = datautils.updatecp(delta,cpvalues,r)
@@ -595,14 +596,16 @@ def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
if settings.DEBUG and r.getemailnotifications:
res = handle_sendemail_breakthrough.delay(w.id,r.user.email,
r.user.first_name,
r.user.last_name)
r.user.last_name,
btvalues=btvalues.to_json())
elif r.getemailnotifications:
try:
res = queuehigh.enqueue(
handle_sendemail_breakthrough(w.id,
r.user.email,
r.user.first_name,
r.user.last_name))
r.user.last_name,
btvalues=btvalues.to_json()))
except AttributeError:
pass
else: