Merge pull request #6855 from jumpserver/pr@dev@ticket_notice_bug

fix: ticket_notice_bug
pull/6859/head
feng626 2021-09-14 22:33:42 +08:00 committed by GitHub
commit d14c5c58ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -13,13 +13,15 @@ EMAIL_TEMPLATE = '''
<div>
<p>
{title}
<a href={ticket_detail_url}>
<strong>{ticket_detail_url_description}</strong>
</a>
</p>
<div>
{body}
</div>
<div>
<a href={ticket_detail_url}>
<strong>{ticket_detail_url_description}</strong>
</a>
</div>
</div>
'''
@ -36,13 +38,12 @@ class BaseTicketMessage(UserMessage):
def get_text_msg(self) -> dict:
message = """
{title}: {ticket_detail_url} -> {ticket_detail_url_description}
{title}: {ticket_detail_url}
{body}
""".format(
title=self.content_title,
ticket_detail_url=self.ticket_detail_url,
ticket_detail_url_description=_('click here to review'),
body=self.ticket.body
body=self.ticket.body.replace('<div style="margin-left: 20px;">', '').replace('</div>', '')
)
return {
'subject': self.subject,