Merge branch 'release/hotfix453'
This commit is contained in:
+1
-1
@@ -483,7 +483,7 @@ def new_workout_from_file(r,f2,
|
|||||||
dosummary=dosummary,
|
dosummary=dosummary,
|
||||||
title=title)
|
title=title)
|
||||||
|
|
||||||
return (id,message)
|
return (id,message,f2)
|
||||||
|
|
||||||
# Compare the data from the CSV file and the database
|
# Compare the data from the CSV file and the database
|
||||||
# Currently only calculates number of strokes. To be expanded with
|
# 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)):
|
if (checkworkoutuser(request.user,w)):
|
||||||
try:
|
try:
|
||||||
tcxfile = stravastuff.createstravaworkoutdata(w)
|
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,
|
res = handle_sendemailtcx.delay(r.user.first_name,
|
||||||
r.user.last_name,
|
r.user.last_name,
|
||||||
r.user.email,tcxfile)
|
r.user.email,tcxfile)
|
||||||
|
|
||||||
else:
|
elif tcxfile:
|
||||||
res = queuehigh.enqueue(handle_sendemailtcx,r.user.first_name,
|
res = queuehigh.enqueue(handle_sendemailtcx,r.user.first_name,
|
||||||
r.user.last_name,
|
r.user.last_name,
|
||||||
r.user.email,tcxfile)
|
r.user.email,tcxfile)
|
||||||
@@ -4233,7 +4241,7 @@ def workout_upload_view(request,message="",
|
|||||||
f2 = res[1] # file name incl media directory
|
f2 = res[1] # file name incl media directory
|
||||||
|
|
||||||
|
|
||||||
id,message = dataprep.new_workout_from_file(r,f2,
|
id,message,f2 = dataprep.new_workout_from_file(r,f2,
|
||||||
workouttype=workouttype,
|
workouttype=workouttype,
|
||||||
makeprivate=makeprivate,
|
makeprivate=makeprivate,
|
||||||
title = t,
|
title = t,
|
||||||
|
|||||||
@@ -269,6 +269,7 @@ EMAIL_USE_TLS = CFG['email_use_tls']
|
|||||||
#EMAIL_USE_TLS = False
|
#EMAIL_USE_TLS = False
|
||||||
DEFAULT_FROM_EMAIL = 'admin@rowsandall.com'
|
DEFAULT_FROM_EMAIL = 'admin@rowsandall.com'
|
||||||
|
|
||||||
|
|
||||||
# weather stuff
|
# weather stuff
|
||||||
|
|
||||||
FORECAST_IO_KEY = CFG['forecast_io_key']
|
FORECAST_IO_KEY = CFG['forecast_io_key']
|
||||||
|
|||||||
Reference in New Issue
Block a user