From 2d8dd698bc5757329b8e6eff35de98f9d287dd20 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Tue, 6 Feb 2018 12:05:45 +0100 Subject: [PATCH] Fixed change of Candidate interview from Candidate form --- candidats/forms.py | 1 + 1 file changed, 1 insertion(+) diff --git a/candidats/forms.py b/candidats/forms.py index 8a52126..220860d 100644 --- a/candidats/forms.py +++ b/candidats/forms.py @@ -29,6 +29,7 @@ class CandidateForm(forms.ModelForm): self.initial['interview'].candidat = None self.initial['interview'].save() else: + Interview.objects.filter(candidat=obj).update(candidat=None) self.cleaned_data['interview'].candidat = obj self.cleaned_data['interview'].save() return obj