diff --git a/rowers/tasks.py b/rowers/tasks.py index cbf98d8d..efc0cf44 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -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, } diff --git a/rowers/templates/menu_workout.html b/rowers/templates/menu_workout.html index 84ff5c97..b87876bb 100644 --- a/rowers/templates/menu_workout.html +++ b/rowers/templates/menu_workout.html @@ -41,7 +41,7 @@
  • - +  Compare
  • diff --git a/rowers/templatetags/rowerfilters.py b/rowers/templatetags/rowerfilters.py index a51203ad..e44015eb 100644 --- a/rowers/templatetags/rowerfilters.py +++ b/rowers/templatetags/rowerfilters.py @@ -489,7 +489,7 @@ def teamurl(path,team): # remove user upattern = re.compile('\/user\/\d+/') if upattern.search(path) is not None: - path = upattern.sub('',path) + path = upattern.sub('/',path) if pattern.search(path) is not None: