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(