if not Team.objects.all().filter(pk=self.team, participating_in_contest=self.contest).exists():
            raise ValidationError("This team does not participate in this contest.")