[processing] allow geometryless layers as input in aggregate alg.

This commit is contained in:
nirvn 2018-09-18 11:08:28 +07:00
parent f3b15be9e5
commit f160847ebc

View File

@ -34,6 +34,7 @@ from qgis.core import (
QgsField, QgsField,
QgsFields, QgsFields,
QgsGeometry, QgsGeometry,
QgsProcessing,
QgsProcessingParameterDefinition, QgsProcessingParameterDefinition,
QgsProcessingParameterExpression, QgsProcessingParameterExpression,
QgsProcessingParameterFeatureSink, QgsProcessingParameterFeatureSink,
@ -68,7 +69,8 @@ class Aggregate(QgisAlgorithm):
def initAlgorithm(self, config=None): def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterFeatureSource(self.INPUT, self.addParameter(QgsProcessingParameterFeatureSource(self.INPUT,
self.tr('Input layer'))) self.tr('Input layer'),
types=[QgsProcessing.TypeVector]))
self.addParameter(QgsProcessingParameterExpression(self.GROUP_BY, self.addParameter(QgsProcessingParameterExpression(self.GROUP_BY,
self.tr('Group by expression (NULL to group all features)'), self.tr('Group by expression (NULL to group all features)'),
defaultValue='NULL', defaultValue='NULL',