Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Dec 7, 2023
1 parent e385dfa commit 082279b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ class Meta:
from django.dispatch import receiver
from django.core.exceptions import ValidationError


@receiver(m2m_changed, sender=Team.members.through)
def team_m2m_clean(sender, instance, action, **kwargs):
if action == "post_clear":
Expand All @@ -402,4 +403,3 @@ def team_m2m_clean(sender, instance, action, **kwargs):
if instance.is_empty():
print("Deleting empty team: ", instance.name)
instance.delete()

0 comments on commit 082279b

Please sign in to comment.