From 8c7e2f82669320a48813abc214179e7f2ff1649c Mon Sep 17 00:00:00 2001 From: AAfghahi <48933336+AAfghahi@users.noreply.github.com> Date: Wed, 26 Jan 2022 12:32:41 -0500 Subject: [PATCH] Update superset/reports/notifications/email.py Co-authored-by: Beto Dealmeida --- superset/reports/notifications/email.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/superset/reports/notifications/email.py b/superset/reports/notifications/email.py index cdec21872c3a4..da5244a5eac4c 100644 --- a/superset/reports/notifications/email.py +++ b/superset/reports/notifications/email.py @@ -95,9 +95,11 @@ def _get_content(self) -> EmailContent: html_table = "" call_to_action = __("Explore in Superset") - url = "" - if self._content.url is not None: - url = modify_url_query(self._content.url, standalone="0") + url = ( + modify_url_query(self._content.url, standalone="0") + if self._content.url is not None + else "" + ) img_tags = [] for msgid in images.keys(): img_tags.append(