diff --git a/tournaments/signals.py b/tournaments/signals.py index f262ae4..067a255 100644 --- a/tournaments/signals.py +++ b/tournaments/signals.py @@ -32,10 +32,10 @@ def notify_user_creation_on_discord(sender, instance, created, **kwargs): def notify_object_creation_on_discord(created, instance): if created: - # default_db_engine = settings.DATABASES['default']['ENGINE'] - # if default_db_engine != 'django.db.backends.sqlite3': - message = f'New {instance.__class__.__name__} created: {instance.discord_string()}' - send_discord_message(DISCORD_WEBHOOK_URL, message) + default_db_engine = settings.DATABASES['default']['ENGINE'] + if default_db_engine != 'django.db.backends.sqlite3': + message = f'New {instance.__class__.__name__} created: {instance.discord_string()}' + send_discord_message(DISCORD_WEBHOOK_URL, message) def send_discord_message(webhook_url, content): data = {