Skip to content
Permalink
Browse files

[DB Manager] Fix broken geometry type of GeoPackage based SQL Layers. F…

…ixes #33232
  • Loading branch information
borysiasty authored and nyalldawson committed Dec 13, 2019
1 parent a6c429a commit b6d7649e78d3eef86b6434491015f142272b7da9
Showing with 1 addition and 2 deletions.
  1. +1 −2 python/plugins/db_manager/db_plugins/gpkg/plugin.py
@@ -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):

0 comments on commit b6d7649

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