Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
samtfm committed Apr 6, 2021
1 parent 92edc93 commit c7d456a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions superset/reports/commands/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
from superset.extensions import feature_flag_manager
from superset.models.reports import (
ReportExecutionLog,
ReportRecipients,
ReportRecipientType,
ReportSchedule,
ReportScheduleType,
ReportState,
ReportRecipients
)
from superset.reports.commands.alert import AlertCommand
from superset.reports.commands.exceptions import (
Expand Down Expand Up @@ -226,8 +226,7 @@ def _get_notification_content(self) -> NotificationContent:

@staticmethod
def _send(
notification_content: NotificationContent,
recipients: List[ReportRecipients]
notification_content: NotificationContent, recipients: List[ReportRecipients]
) -> None:
"""
Sends a notification to all recipients
Expand Down Expand Up @@ -266,10 +265,9 @@ def send_error(self, name: str, message: str) -> None:
owner_recipients = [
ReportRecipients(
type=ReportRecipientType.EMAIL,
recipient_config_json=json.dumps({
"target": owner.email
}),
) for owner in self._report_schedule.owners
recipient_config_json=json.dumps({"target": owner.email}),
)
for owner in self._report_schedule.owners
]

self._send(notification_content, owner_recipients)
Expand Down

0 comments on commit c7d456a

Please sign in to comment.