Skip to content
Permalink
Browse files

[dbmanager] Fix python error when scrolling postgis results

Fixes #17835
  • Loading branch information
nyalldawson committed Feb 13, 2018
1 parent ad84961 commit fa56aa5542490f5d793af58f7e0650f460ee7586
@@ -125,7 +125,7 @@ def _sanitizeTableField(self, field):
def getData(self, row, col):
if row < self.fetchedFrom or row >= self.fetchedFrom + self.fetchedCount:
margin = self.fetchedCount / 2
start = self.rowCount() - margin if row + margin >= self.rowCount() else row - margin
start = int(self.rowCount() - margin if row + margin >= self.rowCount() else row - margin)
if start < 0:
start = 0
self.fetchMoreData(start)
@@ -91,9 +91,9 @@ def getData(self, row, col):
row >= self.fetchedFrom + self.fetchedCount):
margin = self.fetchedCount / 2
if row + margin >= self.rowCount():
start = self.rowCount() - margin
start = int(self.rowCount() - margin)
else:
start = row - margin
start = int(row - margin)
if start < 0:
start = 0
self.fetchMoreData(start)

0 comments on commit fa56aa5

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