Fixed crash when setting interview for a new candidate
This commit is contained in:
parent
887072ba31
commit
b1599fbba2
1 changed files with 2 additions and 0 deletions
|
|
@ -26,6 +26,8 @@ class CandidateForm(forms.ModelForm):
|
|||
self.initial['interview'].candidat = None
|
||||
self.initial['interview'].save()
|
||||
else:
|
||||
if not obj.pk:
|
||||
obj.save()
|
||||
Interview.objects.filter(candidat=obj).update(candidat=None)
|
||||
self.cleaned_data['interview'].candidat = obj
|
||||
self.cleaned_data['interview'].save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue