fix issue with registration

bracket-feature
Raz 10 months ago
parent c8c58ce4ec
commit 19d8c26869
  1. 2
      tournaments/services/email_service.py
  2. 4
      tournaments/services/tournament_registration.py
  3. 2
      tournaments/signals.py

@ -82,7 +82,7 @@ class TournamentEmailService:
def send_unregistration_confirmation(captain, tournament, other_player): def send_unregistration_confirmation(captain, tournament, other_player):
tournament_details_str = tournament.build_tournament_details_str() tournament_details_str = tournament.build_tournament_details_str()
email_subject = f"Confirmation de désistement du tournoi {tournament_details_str}" email_subject = f"Désistement du tournoi {tournament_details_str}"
email_body = TournamentEmailService._build_unregistration_email_body( email_body = TournamentEmailService._build_unregistration_email_body(
tournament, tournament,
captain, captain,

@ -163,7 +163,7 @@ class TournamentRegistrationService:
'ligue_name': data.get('ligue_name'), 'ligue_name': data.get('ligue_name'),
'club_name': data.get('club_name'), 'club_name': data.get('club_name'),
'birth_year': data.get('birth_year'), 'birth_year': data.get('birth_year'),
'found': True, 'found_in_french_federation': True,
}) })
return player_data return player_data
@ -253,7 +253,7 @@ class TournamentRegistrationService:
'ligue_name': csv_data.get('ligue_name'), 'ligue_name': csv_data.get('ligue_name'),
'club_name': csv_data.get('club_name'), 'club_name': csv_data.get('club_name'),
'birth_year': csv_data.get('birth_year'), 'birth_year': csv_data.get('birth_year'),
'found': True, 'found_in_french_federation': True,
'email': None, 'email': None,
'phone': None, 'phone': None,
}) })

@ -65,7 +65,7 @@ def unregister_team(sender, instance, **kwargs):
tournament = instance.tournament tournament = instance.tournament
# Skip creating unregistration records if tournament is being deleted # Skip creating unregistration records if tournament is being deleted
if not tournament or tournament._state.adding or hasattr(tournament, '_being_deleted'): if not tournament or tournament._being_deleted == True:
return return
first_waiting_list_team = tournament.first_waiting_list_team() first_waiting_list_team = tournament.first_waiting_list_team()

Loading…
Cancel
Save