From bdd72c7ada3ab3d8fff44a09c884279586bf36a3 Mon Sep 17 00:00:00 2001 From: Raz Date: Mon, 23 Dec 2024 09:37:55 +0100 Subject: [PATCH] handle automatic waiting list email --- tournaments/models/tournament.py | 2 +- tournaments/services/email_service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 6a7846a..a5671cb 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -1164,7 +1164,7 @@ class Tournament(models.Model): teams = self.teams(True) waiting_teams = [team for team in teams if team.stage == "Attente"] if waiting_teams: - return waiting_teams[0] + return waiting_teams[0].team_registration return None class MatchGroup: diff --git a/tournaments/services/email_service.py b/tournaments/services/email_service.py index ce58560..067b45c 100644 --- a/tournaments/services/email_service.py +++ b/tournaments/services/email_service.py @@ -171,7 +171,7 @@ class TournamentEmailService: unregister_url = reverse('unregister-tournament', args=[tournament.id]) # Make it an absolute URL by adding the domain - absolute_url = f"https://127.0.0.1:8000{unregister_url}" # Replace with your domain + absolute_url = f"https://xlr.alwaysdata.net{unregister_url}" # Replace with your domain if other_player is not None: