Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixes #21374: ignore optional output parameters
  • Loading branch information
Rashad Kanavath authored and nyalldawson committed Mar 20, 2019
1 parent f1cc8aa commit f6ad474
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/plugins/processing/gui/AlgorithmDialog.py
Expand Up @@ -165,9 +165,11 @@ def getParameterValues(self):
parameters[param.name()] = value
if param.isDestination():
context = dataobjects.createContext()
#TODO: could we ignore below check if parameter is optional?
ok, error = self.algorithm().provider().isSupportedOutputValue(value, param, context)
if not ok:
raise AlgorithmDialogBase.InvalidOutputExtension(widget, error)
if not param.flags() & QgsProcessingParameterDefinition.FlagOptional:
raise AlgorithmDialogBase.InvalidOutputExtension(widget, error)

return self.algorithm().preprocessParameters(parameters)

Expand Down

0 comments on commit f6ad474

Please sign in to comment.