@ -62,7 +62,7 @@ def send_discord_message(webhook_url, content):
def unregister_team(sender, instance, **kwargs):
team_registration = instance
tournament = instance.tournament
if tournament.is_deleted is True:
if not tournament or tournament.is_deleted is True:
return
# Create unregistered player records and track captain/other player