Commit 81cc5e83 authored by Samuel GAIST's avatar Samuel GAIST Committed by Flavio TARSETTI
Browse files

[experiments][models][experiments] Create experiment link in code

parent e03ce11a
......@@ -547,6 +547,9 @@ class Experiment(Shareable):
subject = "Experiment %s failed" % self.fullname()
template_path = "experiments/failed_experiment_email.txt"
current_site = Site.objects.get_current()
experiment_link = f"https://{current_site.domain}" + self.get_absolute_url()
try:
send_mail(
subject,
......@@ -555,7 +558,7 @@ class Experiment(Shareable):
{
"experiment": self,
"beat_version": __version__,
"site": Site.objects.get_current(),
"experiment_link": experiment_link,
},
),
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