Skip to content

Commit

Permalink
Merge pull request #560 from battlecode/jerrym-fix-delete-team
Browse files Browse the repository at this point in the history
Fix deleting empty teams
  • Loading branch information
j-mao authored Jan 15, 2023
2 parents f149908 + 3c954b8 commit 95f354a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/siarnaq/api/teams/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def copy_rating_to_profile(instance, update_fields, **kwargs):
def handle_empty_team(instance, action, **kwargs):
if action == "post_remove":
if instance.members.count() == 0:
if not instance.has_active_submission():
if not instance.submissions.exists():
logger.debug(
"team_delete", message="Team is deleted.", team=instance.pk
)
Expand Down

0 comments on commit 95f354a

Please sign in to comment.