Skip to content

Commit

Permalink
fix: email template
Browse files Browse the repository at this point in the history
  • Loading branch information
shahargl committed Oct 29, 2024
1 parent 3f24f57 commit c346587
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion keep/api/routes/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def run_workflow(
else:
event_class = IncidentDto

event_body = body.get("body", {})
event_body = body.get("body", {}) or body

# if its event that was triggered by the UI with the Modal
if "test-workflow" in event_body.get("fingerprint", "") or not body:
Expand Down
5 changes: 3 additions & 2 deletions keep/iohandler/iohandler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ast
import copy
import html

# TODO: fix this! It screws up the eval statement if these are not imported
import inspect
Expand Down Expand Up @@ -311,8 +312,6 @@ def _parse(self, tree):
# this is happens when libraries such as datadog api client
# HTML escapes the string and then ast.parse fails ()
# https://github.com/keephq/keep/issues/137
import html

try:
unescaped_token = html.unescape(
token.replace("\r\n", "").replace("\n", "")
Expand Down Expand Up @@ -376,6 +375,8 @@ def _render(self, key: str, safe=False, default=""):
return default

if const_rendering:
# https://github.com/keephq/keep/issues/2326
rendered = html.unescape(rendered)
return self._render(rendered, safe, default)
return rendered

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "keep"
version = "0.27.6"
version = "0.27.7"
description = "Alerting. for developers, by developers."
authors = ["Keep Alerting LTD"]
readme = "README.md"
Expand Down

0 comments on commit c346587

Please sign in to comment.