Merge branch 'patch/targets' into 'master'

Avoid error 500 when target is forgotten

See merge request ae/Sith!187
This commit is contained in:
Antoine Bartuccio 2018-12-19 00:02:25 +01:00
commit 80248ec8d3

View File

@ -415,7 +415,7 @@ class OperationForm(forms.ModelForm):
and self.cleaned_data.get("club") is None and self.cleaned_data.get("club") is None
and self.cleaned_data.get("club_account") is None and self.cleaned_data.get("club_account") is None
and self.cleaned_data.get("company") is None and self.cleaned_data.get("company") is None
and self.cleaned_data.get("target_label") is None and self.cleaned_data.get("target_label") is ""
): ):
self.add_error( self.add_error(
"target_type", ValidationError(_("The target must be set.")) "target_type", ValidationError(_("The target must be set."))