Skip to content

Commit

Permalink
[DB Manager] Fix broken geometry type of GeoPackage based SQL Layers. F…
Browse files Browse the repository at this point in the history
…ixes #33232
  • Loading branch information
borysiasty authored and nyalldawson committed Dec 16, 2019
1 parent 0d84e35 commit dbdc397
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/plugins/db_manager/db_plugins/gpkg/plugin.py
Expand Up @@ -178,8 +178,7 @@ def uniqueIdFunction(self):
def toSqlLayer(self, sql, geomCol, uniqueCol, layerName="QueryLayer", layerType=None, avoidSelectById=False, filter=""):
from qgis.core import QgsVectorLayer

vl = QgsVectorLayer(self.uri().database(), layerName, 'ogr')
vl.setSubsetString(sql)
vl = QgsVectorLayer(self.uri().database() + '|subset=' + sql, layerName, 'ogr')
return vl

def supportsComment(self):
Expand Down

0 comments on commit dbdc397

Please sign in to comment.