Private
Public Access
1
0

Email confirmations for workouts received

This commit is contained in:
Sander Roosendaal
2016-11-18 13:52:22 +01:00
parent 439bca2f9c
commit ae7b7fb9ab
2 changed files with 29 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ from rowingdata import make_cumvalues
from rowingdata import summarydata,get_file_type
from scipy.signal import savgol_filter
from rowers.mailprocessing import make_new_workout_from_email
from rowers.mailprocessing import make_new_workout_from_email,send_confirm
def rdata(file,rower=rrower()):
try:
@@ -60,7 +60,11 @@ class Command(BaseCommand):
rr = Rower.objects.get(user=u.id)
# move attachment and make workout
try:
res += [make_new_workout_from_email(rr,a.document,name,cntr=cntr)]
wid = [make_new_workout_from_email(rr,a.document,name)]
res += wid
link = 'http://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit'
dd = send_confirm(u,name,link)
except:
# replace with code to process error
res += ['fail: '+name]