Skip to content

Commit

Permalink
[DB Manager] Fix No Geometry tables
Browse files Browse the repository at this point in the history
Avoid to add a nonexistent 'geometry' field to the fields list of No Geometry tables.
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Apr 29, 2021
1 parent 8a0f956 commit 96c75b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/plugins/db_manager/db_plugins/vlayers/connector.py
Expand Up @@ -251,7 +251,8 @@ def getTableFields(self, table):
n = l.dataProvider().fields().size()
f = [(i, f.name(), f.typeName(), False, None, False)
for i, f in enumerate(l.dataProvider().fields())]
f += [(n, "geometry", "geometry", False, None, False)]
if l.isSpatial():
f += [(n, "geometry", "geometry", False, None, False)]
return f

def getTableIndexes(self, table):
Expand Down

0 comments on commit 96c75b8

Please sign in to comment.