Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(workflows): email template #2328

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading