From 5b163d0428d86ea6d750db86bff3c633dc35b633 Mon Sep 17 00:00:00 2001 From: Blottiere Paul Date: Mon, 2 Oct 2023 14:49:20 +0200 Subject: [PATCH] Raise error in case if invalid parameter in batch mode --- python/plugins/processing/gui/BatchPanel.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/plugins/processing/gui/BatchPanel.py b/python/plugins/processing/gui/BatchPanel.py index 97b2c9e263f7..017b45514d27 100644 --- a/python/plugins/processing/gui/BatchPanel.py +++ b/python/plugins/processing/gui/BatchPanel.py @@ -777,6 +777,11 @@ def parametersForRow(self, row, destinationProject=None, warnOnInvalid=True): widget = self.tblParameters.cellWidget(row + 1, col) text = widget.getValue() if not warnOnInvalid or out.checkValueIsAcceptable(text): + ok, error = out.isSupportedOutputValue(text, createContext()) + if not ok: + self.parent.messageBar().pushMessage("", error, level=Qgis.Warning, duration=5) + return {}, False + if isinstance(out, (QgsProcessingParameterRasterDestination, QgsProcessingParameterVectorDestination, QgsProcessingParameterFeatureSink)):