mirror of
https://github.com/apache/superset.git
synced 2026-04-17 15:15:20 +00:00
fix: Retrieving Slack channels when Slack is disabled (#30074)
This commit is contained in:
committed by
GitHub
parent
9596e458c6
commit
72a520fba4
@@ -259,7 +259,12 @@ export const NotificationMethod: FunctionComponent<NotificationMethodProps> = ({
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!slackOptions[0]?.options.length) {
|
||||
const slackEnabled = options?.some(
|
||||
option =>
|
||||
option === NotificationMethodOption.Slack ||
|
||||
option === NotificationMethodOption.SlackV2,
|
||||
);
|
||||
if (slackEnabled && !slackOptions[0]?.options.length) {
|
||||
fetchSlackChannels({ types: ['public_channel', 'private_channel'] })
|
||||
.then(({ json }) => {
|
||||
const { result } = json;
|
||||
|
||||
Reference in New Issue
Block a user