Skip to content

Commit 03e4c07

Browse files
authoredSep 10, 2018
back port of #7849 to 3.2
1 parent 4bf5d4d commit 03e4c07

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎python/plugins/db_manager/db_plugins/vlayers/connector.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,14 @@ def getRasterTables(self, schema=None):
250250
return []
251251

252252
def getTableRowCount(self, table):
253-
t = table[1]
254-
l = VLayerRegistry.instance().getLayer(t)
253+
l = VLayerRegistry.instance().getLayer(table)
255254
if not l or not l.isValid():
256255
return None
257256
return l.featureCount()
258257

259258
def getTableFields(self, table):
260259
""" return list of columns in table """
261-
t = table[1]
262-
l = VLayerRegistry.instance().getLayer(t)
260+
l = VLayerRegistry.instance().getLayer(table)
263261
if not l or not l.isValid():
264262
return []
265263
# id, name, type, nonnull, default, pk

0 commit comments

Comments
 (0)