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 0d84e35 commit dbdc397fd8d303184b7a73ce7b371ce04484e6f0
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 dbdc397

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