Commit b28821eb authored by Rashad Kanavath's avatar Rashad Kanavath

update fix for isSupportedOutputValue

parent 20cb5e48
......@@ -31,7 +31,10 @@ import os
import re
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtCore import QCoreApplication
from qgis.core import (Qgis, QgsProcessingProvider, QgsMessageLog)
from qgis.core import (Qgis,
QgsProcessingProvider,
QgsProcessingParameterDefinition,
QgsMessageLog)
from qgis import utils
from processing.core.ProcessingConfig import ProcessingConfig, Setting
......@@ -276,10 +279,10 @@ class OtbAlgorithmProvider(QgsProcessingProvider):
def supportedOutputTableExtensions(self):
return ['dbf']
def isSupportedOutputValue(self, outputValue, parameter, context):
if not 'group_key' in parameter.metadata()
return super().isSupportedOutputValue(outputValue, parameter, context)
#TODO: Need a better way to deal otb apps that have multiple destionation parameters
return True, None
# TODO: QGIS 3.8 raise error only for parameters that are not optional
ok, error = super().isSupportedOutputValue(outputValue, parameter, context)
if not ok:
if parameter.flags() & QgsProcessingParameterDefinition.FlagOptional:
return True, None
return ok, error
......@@ -34,8 +34,7 @@ from processing.gui.wrappers import (WidgetWrapper,
DIALOG_BATCH,
DIALOG_MODELER)
#TODO: move OtbChoiceWidgetWrapper and OtbChoiceParameter class into qgis processing as any other parameter
# TODO: QGIS 3.8 move OtbChoiceWidgetWrapper and OtbChoiceParameter class into qgis processing as any other parameter
class OtbChoiceWidgetWrapper(WidgetWrapper):
def __init__(self, param, dialog, row=0, col=0, **kwargs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment