Skip to content

Commit

Permalink
Raise error in case if invalid parameter in batch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Oct 2, 2023
1 parent 7bf5cc7 commit 5b163d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/plugins/processing/gui/BatchPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand Down

0 comments on commit 5b163d0

Please sign in to comment.