Skip to content

Commit

Permalink
Merge pull request #4364 from magfest/fix-email-template-links
Browse files Browse the repository at this point in the history
Fix email template links
  • Loading branch information
kitsuta committed May 15, 2024
2 parents f76d9f4 + fb1e40f commit 856b8ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uber/automated_emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ def update_template_plugin_info(self):
env = JinjaEnv.env()
try:
template_path = pathlib.Path(env.get_or_select_template(os.path.join('emails', self.template)).filename)
self.template_plugin_name = template_path.parts[3]
self.template_plugin_name = template_path.parts[2]
self.template_url = (f"https://github.com/magfest/{self.template_plugin_name}/tree/main/"
f"{self.template_plugin_name}/{pathlib.Path(*template_path.parts[5:]).as_posix()}")
f"{self.template_plugin_name}/{pathlib.Path(*template_path.parts[3:]).as_posix()}")
except jinja2.exceptions.TemplateNotFound:
self.template_plugin_name = "ERROR: TEMPLATE NOT FOUND"
self.template_url = ""
Expand Down

0 comments on commit 856b8ef

Please sign in to comment.