Email confirmations for workouts received
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user