Skip to content

Commit

Permalink
Ensure variable contains a string before using it as URL
Browse files Browse the repository at this point in the history
  • Loading branch information
eecavanna authored Nov 22, 2024
1 parent 67ce83b commit 31bf377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nmdc_server/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def require_setting(name: str):

# Post a message to Slack if a Slack webhook URL is defined.
# Reference: https://api.slack.com/messaging/webhooks#posting_with_webhooks
if settings.slack_webhook_url_for_ingester not in [None, ""]:
if isinstance(settings.slack_webhook_url_for_ingester, str):
click.echo("Posting message to Slack.")
response = requests.post(
settings.slack_webhook_url_for_ingester,
Expand Down

0 comments on commit 31bf377

Please sign in to comment.