bugfix new comment email
This commit is contained in:
@@ -68,6 +68,7 @@ from rowers.dataprepnodjango import (
|
|||||||
# create_strava_stroke_data_db
|
# create_strava_stroke_data_db
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from rowers.opaque import encoder
|
||||||
|
|
||||||
from django.core.mail import (
|
from django.core.mail import (
|
||||||
send_mail,
|
send_mail,
|
||||||
@@ -1890,7 +1891,8 @@ def handle_sendemailnewresponse(first_name, last_name,
|
|||||||
if 'sessiontype' in kwargs:
|
if 'sessiontype' in kwargs:
|
||||||
sessiontype=kwargs.pop('sessiontype')
|
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:
|
if 'commentlink' in kwargs:
|
||||||
commentlink = kwargs.pop('commentlink')
|
commentlink = kwargs.pop('commentlink')
|
||||||
|
|
||||||
@@ -1940,7 +1942,8 @@ def handle_sendemailnewcomment(first_name,
|
|||||||
if 'sessiontype' in kwargs:
|
if 'sessiontype' in kwargs:
|
||||||
sessiontype=kwargs.pop('sessiontype')
|
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:
|
if 'commentlink' in kwargs:
|
||||||
commentlink = kwargs.pop('commentlink')
|
commentlink = kwargs.pop('commentlink')
|
||||||
|
|
||||||
@@ -1951,7 +1954,7 @@ def handle_sendemailnewcomment(first_name,
|
|||||||
'comment':comment,
|
'comment':comment,
|
||||||
'workoutname':workoutname,
|
'workoutname':workoutname,
|
||||||
'siteurl':siteurl,
|
'siteurl':siteurl,
|
||||||
'workoutid':workoutid,
|
'workoutid':encoder.encode_hex(workoutid),
|
||||||
'sessiontype':sessiontype,
|
'sessiontype':sessiontype,
|
||||||
'commentlink':commentlink,
|
'commentlink':commentlink,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li id="compare">
|
<li id="compare">
|
||||||
<a href="/rowers/multi-compare/workout/{{ workout.id|encode }}/">
|
<a href="/rowers/team-compare-select/workout/{{ workout.id|encode }}/">
|
||||||
<i class="fas fa-balance-scale fa-fw"></i> Compare
|
<i class="fas fa-balance-scale fa-fw"></i> Compare
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -489,7 +489,7 @@ def teamurl(path,team):
|
|||||||
# remove user
|
# remove user
|
||||||
upattern = re.compile('\/user\/\d+/')
|
upattern = re.compile('\/user\/\d+/')
|
||||||
if upattern.search(path) is not None:
|
if upattern.search(path) is not None:
|
||||||
path = upattern.sub('',path)
|
path = upattern.sub('/',path)
|
||||||
|
|
||||||
|
|
||||||
if pattern.search(path) is not None:
|
if pattern.search(path) is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user