Vitor-Avila commented on code in PR #32336:
URL: https://github.com/apache/superset/pull/32336#discussion_r1976101198


##########
superset/commands/report/execute.py:
##########
@@ -139,15 +139,21 @@ 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
+                    current_target_count = 
slack_recipients["target"].split(",")
+                    channels = get_channels_with_search(
+                        slack_recipients["target"],
+                        types=[
+                            SlackChannelTypes.PRIVATE,
+                            SlackChannelTypes.PUBLIC,
+                        ],
+                        exact_match=True,
+                    )
+                    if len(current_target_count) != len(channels):
+                        raise UpdateFailedError("Not all channels could be 
found")

Review Comment:
   This is good feedback! I'll add this in a following commit.



-- 
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]

Reply via email to