Skip to content

Commit

Permalink
update url for slack reports
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Feb 16, 2022
1 parent 4ab0786 commit 25e0c95
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion superset/reports/notifications/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from superset.models.reports import ReportRecipientType
from superset.reports.notifications.base import BaseNotification
from superset.reports.notifications.exceptions import NotificationError
from superset.utils.urls import modify_url_query

logger = logging.getLogger(__name__)

Expand All @@ -47,6 +48,11 @@ def _get_channel(self) -> str:
return json.loads(self._recipient.recipient_config_json)["target"]

def _message_template(self, table: str = "") -> str:
url = (
modify_url_query(self._content.url, standalone="0")
if self._content.url is not None
else ""
)
return __(
"""*%(name)s*
Expand All @@ -58,7 +64,7 @@ def _message_template(self, table: str = "") -> str:
""",
name=self._content.name,
description=self._content.description or "",
url=self._content.url,
url=url,
table=table,
)

Expand Down

0 comments on commit 25e0c95

Please sign in to comment.