Skip to content
Permalink
Browse files
Fix DB manager postgis double query
Fixes #45318
  • Loading branch information
elpaso authored and nyalldawson committed Nov 1, 2021
1 parent 55dfd57 commit 86d26c57219f6ca0e16044fe2ec3684b174656b0
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/plugins/db_manager/db_plugins/postgis/connector.py
@@ -96,7 +96,7 @@ def _toStrResultSet(self, res):
return newres

def _execute(self, sql=None):
if self.sql == sql and self.result is not None:
if (sql is None or self.sql == sql) and self.result is not None:
return
if (sql is not None):
self.sql = sql
@@ -168,7 +168,7 @@ def fetchone(self):
self._execute()
if len(self.result) - self.cursor:
res = self.result[self.cursor]
++self.cursor
self.cursor += 1
return res
return None

0 comments on commit 86d26c5

Please sign in to comment.