From 91c60e8fbece64a4800ee29b2916c08bc1ba4ea3 Mon Sep 17 00:00:00 2001 From: Toksi86 Date: Mon, 7 Oct 2024 17:59:16 +0500 Subject: [PATCH] Fix team assignment bug where other players were removed from the team when assigned --- adaptive_hockey_federation/main/forms.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/adaptive_hockey_federation/main/forms.py b/adaptive_hockey_federation/main/forms.py index f4baeedb..9d55d803 100644 --- a/adaptive_hockey_federation/main/forms.py +++ b/adaptive_hockey_federation/main/forms.py @@ -205,9 +205,6 @@ def save(self, commit=True): instance = super().save(commit=False) if commit: instance.save() - instance.team.through.objects.filter( - team__in=self.cleaned_data["team"], - ).delete() instance.team.set(self.cleaned_data["team"]) return instance