Skip to content
Snippets Groups Projects
Commit 56c43fbf authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[reports][commands][send_report_cleanup_warning_and_cleanup] Create attestation link in code

parent 1260bd49
No related branches found
No related tags found
2 merge requests!379Fix reports url prefix usage,!342Django 3 migration
......@@ -63,6 +63,9 @@ class Command(BaseCommand):
template_path = "reports/report_about_to_expire_email.txt"
for report in reports_about_to_expire:
subject = "Report %s is about to expire" % report.name
report_link = (
f"https://{current_site.domain}" + report.get_absolute_url()
)
send_mail(
subject,
......@@ -71,7 +74,7 @@ class Command(BaseCommand):
{
"report": report,
"beat_version": __version__,
"site": current_site,
"report_link": report_link,
},
),
settings.DEFAULT_FROM_EMAIL,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment