From 8388f4ee65b8371ecfb55c831241709c8a38383b Mon Sep 17 00:00:00 2001 From: Krophil Date: Tue, 18 Dec 2018 23:50:24 +0100 Subject: [PATCH] Avoid error 500 when target is forgotten --- accounting/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounting/views.py b/accounting/views.py index 5ebd0e2a..ce6bd928 100644 --- a/accounting/views.py +++ b/accounting/views.py @@ -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."))