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
...@@ -63,6 +63,9 @@ class Command(BaseCommand): ...@@ -63,6 +63,9 @@ class Command(BaseCommand):
template_path = "reports/report_about_to_expire_email.txt" template_path = "reports/report_about_to_expire_email.txt"
for report in reports_about_to_expire: for report in reports_about_to_expire:
subject = "Report %s is about to expire" % report.name subject = "Report %s is about to expire" % report.name
report_link = (
f"https://{current_site.domain}" + report.get_absolute_url()
)
send_mail( send_mail(
subject, subject,
...@@ -71,7 +74,7 @@ class Command(BaseCommand): ...@@ -71,7 +74,7 @@ class Command(BaseCommand):
{ {
"report": report, "report": report,
"beat_version": __version__, "beat_version": __version__,
"site": current_site, "report_link": report_link,
}, },
), ),
settings.DEFAULT_FROM_EMAIL, settings.DEFAULT_FROM_EMAIL,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment