Skip to content

Commit f6ad474

Browse files
Rashad Kanavathnyalldawson
Rashad Kanavath
authored andcommitted
fixes #21374: ignore optional output parameters
1 parent f1cc8aa commit f6ad474

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/plugins/processing/gui/AlgorithmDialog.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ def getParameterValues(self):
165165
parameters[param.name()] = value
166166
if param.isDestination():
167167
context = dataobjects.createContext()
168+
#TODO: could we ignore below check if parameter is optional?
168169
ok, error = self.algorithm().provider().isSupportedOutputValue(value, param, context)
169170
if not ok:
170-
raise AlgorithmDialogBase.InvalidOutputExtension(widget, error)
171+
if not param.flags() & QgsProcessingParameterDefinition.FlagOptional:
172+
raise AlgorithmDialogBase.InvalidOutputExtension(widget, error)
171173

172174
return self.algorithm().preprocessParameters(parameters)
173175

0 commit comments

Comments
 (0)