Merge branch 'release/hotfix453'
This commit is contained in:
+1
-1
@@ -483,7 +483,7 @@ def new_workout_from_file(r,f2,
|
||||
dosummary=dosummary,
|
||||
title=title)
|
||||
|
||||
return (id,message)
|
||||
return (id,message,f2)
|
||||
|
||||
# Compare the data from the CSV file and the database
|
||||
# Currently only calculates number of strokes. To be expanded with
|
||||
|
||||
+11
-3
@@ -685,12 +685,20 @@ def workout_tcxemail_view(request,id=0):
|
||||
if (checkworkoutuser(request.user,w)):
|
||||
try:
|
||||
tcxfile = stravastuff.createstravaworkoutdata(w)
|
||||
if settings.DEBUG:
|
||||
if tcxfile == 0:
|
||||
message = "Something went wrong (TCX export)"
|
||||
url = reverse(workout_export_view,
|
||||
kwargs = {
|
||||
'id':str(w.id),
|
||||
'message':message,
|
||||
})
|
||||
return HttpResponseRedirect(url)
|
||||
if settings.DEBUG and tcxfile:
|
||||
res = handle_sendemailtcx.delay(r.user.first_name,
|
||||
r.user.last_name,
|
||||
r.user.email,tcxfile)
|
||||
|
||||
else:
|
||||
elif tcxfile:
|
||||
res = queuehigh.enqueue(handle_sendemailtcx,r.user.first_name,
|
||||
r.user.last_name,
|
||||
r.user.email,tcxfile)
|
||||
@@ -4233,7 +4241,7 @@ def workout_upload_view(request,message="",
|
||||
f1 = res[0] # file name
|
||||
f2 = res[1] # file name incl media directory
|
||||
|
||||
|
||||
|
||||
id,message,f2 = dataprep.new_workout_from_file(r,f2,
|
||||
workouttype=workouttype,
|
||||
makeprivate=makeprivate,
|
||||
|
||||
@@ -269,6 +269,7 @@ EMAIL_USE_TLS = CFG['email_use_tls']
|
||||
#EMAIL_USE_TLS = False
|
||||
DEFAULT_FROM_EMAIL = 'admin@rowsandall.com'
|
||||
|
||||
|
||||
# weather stuff
|
||||
|
||||
FORECAST_IO_KEY = CFG['forecast_io_key']
|
||||
|
||||
Reference in New Issue
Block a user