Avoid error 500 when target is forgotten

This commit is contained in:
Pierre Brunet 2018-12-18 23:50:24 +01:00
parent acfbdd1ad5
commit 8388f4ee65
1 changed files with 1 additions and 1 deletions

View File

@ -415,7 +415,7 @@ class OperationForm(forms.ModelForm):
and self.cleaned_data.get("club") is None
and self.cleaned_data.get("club_account") 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(
"target_type", ValidationError(_("The target must be set."))