Fixed change of Candidate interview from Candidate form

This commit is contained in:
Claude Paroz 2018-02-06 12:05:45 +01:00
parent b15a8418fc
commit 2d8dd698bc

View file

@ -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