Private
Public Access
1
0

bugfix new comment email

This commit is contained in:
Sander Roosendaal
2019-02-22 15:28:02 +01:00
parent 0d1884962b
commit fb2d193ed5
3 changed files with 8 additions and 5 deletions

View File

@@ -68,6 +68,7 @@ from rowers.dataprepnodjango import (
# create_strava_stroke_data_db
)
from rowers.opaque import encoder
from django.core.mail import (
send_mail,
@@ -1890,7 +1891,8 @@ def handle_sendemailnewresponse(first_name, last_name,
if 'sessiontype' in kwargs:
sessiontype=kwargs.pop('sessiontype')
commentlink = '/rowers/workout/{workoutid}/comment/'.format(workoutid=workoutid)
commentlink = '/rowers/workout/{workoutid}/comment/'.format(
workoutid=encoder.encode_hex(workoutid))
if 'commentlink' in kwargs:
commentlink = kwargs.pop('commentlink')
@@ -1940,7 +1942,8 @@ def handle_sendemailnewcomment(first_name,
if 'sessiontype' in kwargs:
sessiontype=kwargs.pop('sessiontype')
commentlink = '/rowers/workout/{workoutid}/comment/'.format(workoutid=workoutid)
commentlink = '/rowers/workout/{workoutid}/comment/'.format(
workoutid=encoder.encode_hex(workoutid))
if 'commentlink' in kwargs:
commentlink = kwargs.pop('commentlink')
@@ -1951,7 +1954,7 @@ def handle_sendemailnewcomment(first_name,
'comment':comment,
'workoutname':workoutname,
'siteurl':siteurl,
'workoutid':workoutid,
'workoutid':encoder.encode_hex(workoutid),
'sessiontype':sessiontype,
'commentlink':commentlink,
}