diff --git a/InvenTree/common/views.py b/InvenTree/common/views.py index d486b2b32e..b695002dc1 100644 --- a/InvenTree/common/views.py +++ b/InvenTree/common/views.py @@ -591,6 +591,11 @@ class FileManagementAjaxView(AjaxView): self.setTemplate() return self.renderJsonResponse(request) + def get_data(self): + data = super().get_data() + data['hideErrorMessage'] = '1' + return data + def setTemplate(self): """ set template name and title """ self.ajax_template_name = self.ajax_form_steps_template[self.get_step_index()] diff --git a/InvenTree/templates/js/modals.js b/InvenTree/templates/js/modals.js index 741d558164..3f6b50cffa 100644 --- a/InvenTree/templates/js/modals.js +++ b/InvenTree/templates/js/modals.js @@ -780,7 +780,7 @@ function handleModalForm(url, options) { modalSetTitle(modal, response.title); } - if (response.hideErrorMessage || !options.hideErrorMessage) { + if (!response.hideErrorMessage && !options.hideErrorMessage) { var warningDiv = $(modal).find('#form-validation-warning'); warningDiv.css('display', 'block'); }