|
|
|
@ -91,6 +91,8 @@ def notify_team(team, tournament, message_type): |
|
|
|
|
|
|
|
|
|
|
|
@receiver(pre_delete, sender=TeamRegistration) |
|
|
|
@receiver(pre_delete, sender=TeamRegistration) |
|
|
|
def unregister_team(sender, instance, **kwargs): |
|
|
|
def unregister_team(sender, instance, **kwargs): |
|
|
|
|
|
|
|
if not instance.tournament: |
|
|
|
|
|
|
|
return |
|
|
|
if instance.tournament.is_deleted: |
|
|
|
if instance.tournament.is_deleted: |
|
|
|
return |
|
|
|
return |
|
|
|
if instance.tournament.enable_online_registration is False: |
|
|
|
if instance.tournament.enable_online_registration is False: |
|
|
|
@ -157,7 +159,7 @@ def check_waiting_list(sender, instance, **kwargs): |
|
|
|
|
|
|
|
|
|
|
|
@receiver(pre_save, sender=TeamRegistration) |
|
|
|
@receiver(pre_save, sender=TeamRegistration) |
|
|
|
def warn_team_walkout_status_change(sender, instance, **kwargs): |
|
|
|
def warn_team_walkout_status_change(sender, instance, **kwargs): |
|
|
|
if instance.id is None or instance.tournament.enable_online_registration is False: |
|
|
|
if instance.id is None or instance.tournament is None or instance.tournament.enable_online_registration is False: |
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
previous_instance = None |
|
|
|
previous_instance = None |
|
|
|
|