[DB Manager] Fix No Geometry tables

Avoid to add a nonexistent 'geometry' field to the fields list of No Geometry tables.
This commit is contained in:
Andrea Giudiceandrea 2021-04-23 08:25:14 +02:00 committed by GitHub
parent 2538612a21
commit 828638f661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -251,7 +251,8 @@ class VLayerConnector(DBConnector):
n = l.dataProvider().fields().size() n = l.dataProvider().fields().size()
f = [(i, f.name(), f.typeName(), False, None, False) f = [(i, f.name(), f.typeName(), False, None, False)
for i, f in enumerate(l.dataProvider().fields())] 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 return f
def getTableIndexes(self, table): def getTableIndexes(self, table):