From b17b8db25c46a5f18d8e025f1e2a16f58103c5a4 Mon Sep 17 00:00:00 2001 From: eeintech Date: Mon, 9 Nov 2020 17:00:12 -0500 Subject: [PATCH] Fix for #1111 (missing logic) --- InvenTree/InvenTree/forms.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/forms.py b/InvenTree/InvenTree/forms.py index 50c8c1b173..f9f8378526 100644 --- a/InvenTree/InvenTree/forms.py +++ b/InvenTree/InvenTree/forms.py @@ -27,7 +27,11 @@ class HelperForm(forms.ModelForm): self.helper = FormHelper() self.helper.form_tag = False - self.helper.form_show_errors = False + + # Check for errors from model validation + # If none, disable crispy form errors + if not self.errors: + self.helper.form_show_errors = False """ Create a default 'layout' for this form.