@@ -633,15 +633,16 @@ def processCommand(self, parameters, context, feedback, delOutputs=False):
633
633
uniqueBasename = outName + self .uniqueSuffix
634
634
command += ' {}={}' .format (outName , uniqueBasename )
635
635
else :
636
- # We add an output name to make sure it is unique if the session
637
- # uses this algorithm several times.
638
- #value = self.parameterAsOutputLayer(parameters, outName, context)
639
- uniqueOutputName = outName + self .uniqueSuffix
640
- command += ' {}={}' .format (outName , uniqueOutputName )
641
-
642
- # Add output file to exported layers, to indicate that
643
- # they are present in GRASS
644
- self .exportedLayers [outName ] = uniqueOutputName
636
+ if outName in parameters and parameters [outName ] is not None :
637
+ # We add an output name to make sure it is unique if the session
638
+ # uses this algorithm several times.
639
+ #value = self.parameterAsOutputLayer(parameters, outName, context)
640
+ uniqueOutputName = outName + self .uniqueSuffix
641
+ command += ' {}={}' .format (outName , uniqueOutputName )
642
+
643
+ # Add output file to exported layers, to indicate that
644
+ # they are present in GRASS
645
+ self .exportedLayers [outName ] = uniqueOutputName
645
646
646
647
command += ' --overwrite'
647
648
self .commands .append (command )
0 commit comments