Vitor-Avila commented on code in PR #32336:
URL: https://github.com/apache/superset/pull/32336#discussion_r1982590984
##########
superset/commands/report/execute.py:
##########
@@ -139,22 +139,37 @@ def update_report_schedule_slack_v2(self) -> None:
slack_recipients =
json.loads(recipient.recipient_config_json)
# we need to ensure that existing reports can also fetch
# ids from private channels
+ channels_list =
get_recipients_list(slack_recipients["target"])
+ channels_list = [channel.lstrip("#") for channel in
channels_list]
+ channels = get_channels_with_search(
+ search_string=channels_list,
+ types=[
+ SlackChannelTypes.PRIVATE,
+ SlackChannelTypes.PUBLIC,
+ ],
+ exact_match=True,
+ )
+ if len(channels_list) != len(channels):
+ missing_channels = set(channels_list) - {
+ channel["name"] for channel in channels
+ }
+ msg = (
+ "Could not find the following channels: "
+ f"{', '.join(missing_channels)}"
+ )
+ raise UpdateFailedError(msg)
+ channel_ids = ", ".join(channel["id"] for channel in
channels)
Review Comment:
Oh, we don't. Removing this now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]