Skip to content
Permalink
Browse files

Fix editing models with custom params

  • Loading branch information
m-kuhn authored and nyalldawson committed Mar 5, 2018
1 parent cb84b83 commit e67939b1833f13a66761b6d4a3a2df9ece060229
Showing with 7 additions and 2 deletions.
  1. +7 −2 python/plugins/processing/modeler/ModelerParameterDefinitionDialog.py
@@ -400,9 +400,14 @@ def accept(self):
isinstance(self.param, QgsProcessingParameterCrs)):
self.param = QgsProcessingParameterCrs(name, description, self.selector.crs().authid())
else:
paramTypeDef = QgsApplication.instance().processingRegistry().parameterType(self.paramType)
if self.paramType:
typeId = self.paramType
else:
typeId = self.param.type()

paramTypeDef = QgsApplication.instance().processingRegistry().parameterType(typeId)
if not paramTypeDef:
msg = self.tr('The parameter `{}` is not registered, are you missing a required plugin?'.format(self.paramType))
msg = self.tr('The parameter `{}` is not registered, are you missing a required plugin?'.format(typeId))
raise UndefinedParameterException(msg)
self.param = paramTypeDef.create(name)
self.param.setDescription(name)

0 comments on commit e67939b

Please sign in to comment.
You can’t perform that action at this time.