Skip to content

Commit

Permalink
Geometry type should not be optional in Execute SQL algorithm
Browse files Browse the repository at this point in the history
Instead it should just default to Autodetect

Given how the algorithm uses this parameter this change does not
result in any difference to scripts/etc running this tool, as
before/after this change the algorithm will use Autodetect mode
when the parameter isn't specified explicitly.

This just avoids the confusing situation where both "Not specified"
and "Autodetect" were exposed as options for the geometry type
parameter in the UI, with both having the same result.
  • Loading branch information
nyalldawson committed Oct 5, 2023
1 parent 0a11e3d commit 7b93feb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/ExecuteSQL.py
Expand Up @@ -102,7 +102,7 @@ def initAlgorithm(self, config=None):
'MultiLineString',
'MultiPolygon']
self.addParameter(QgsProcessingParameterEnum(self.INPUT_GEOMETRY_TYPE,
self.tr('Geometry type'), options=self.geometryTypes, optional=True))
self.tr('Geometry type'), options=self.geometryTypes, defaultValue=0))

self.addParameter(QgsProcessingParameterCrs(self.INPUT_GEOMETRY_CRS,
self.tr('CRS'), optional=True))
Expand Down

0 comments on commit 7b93feb

Please sign in to comment.