|
|
|
|
@ -62,6 +62,7 @@ def send_discord_message(webhook_url, content): |
|
|
|
|
def unregister_team(sender, instance, **kwargs): |
|
|
|
|
team_registration = instance |
|
|
|
|
tournament=instance.tournament |
|
|
|
|
first_waiting_list_team = tournament.first_waiting_list_team() |
|
|
|
|
print("Unregistering team from tournament") |
|
|
|
|
unregistered_team = UnregisteredTeam.objects.create( |
|
|
|
|
tournament=tournament, |
|
|
|
|
@ -82,8 +83,6 @@ def unregister_team(sender, instance, **kwargs): |
|
|
|
|
licence_id=player.licence_id, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
first_waiting_list_team = tournament.first_waiting_list_team() |
|
|
|
|
|
|
|
|
|
if first_waiting_list_team: |
|
|
|
|
waiting_captain = None |
|
|
|
|
waiting_other_player = None |
|
|
|
|
@ -93,14 +92,14 @@ def unregister_team(sender, instance, **kwargs): |
|
|
|
|
else: |
|
|
|
|
waiting_other_player = player |
|
|
|
|
|
|
|
|
|
if waiting_captain and waiting_captain.source is PlayerDataSource.ONLINE_REGISTRATION and waiting_captain.email: |
|
|
|
|
if waiting_captain is not None and waiting_captain.source == PlayerDataSource.ONLINE_REGISTRATION and waiting_captain.email is not None: |
|
|
|
|
TournamentEmailService.send_out_of_waiting_list_confirmation( |
|
|
|
|
waiting_captain, |
|
|
|
|
tournament, |
|
|
|
|
waiting_other_player |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
if captain and captain.source is PlayerDataSource.ONLINE_REGISTRATION and captain.email: |
|
|
|
|
if captain is not None and captain.source == PlayerDataSource.ONLINE_REGISTRATION and captain.email is not None: |
|
|
|
|
TournamentEmailService.send_unregistration_confirmation( |
|
|
|
|
captain, |
|
|
|
|
tournament, |
|
|
|
|
|