Fix the SWHIndexingLister.db_partition_indices

the db query actually returns a table-like (2d) structure.
This commit is contained in:
David Douard 2019-01-31 16:08:31 +01:00
parent 1b2d6895a9
commit 94a35f12aa

View file

@ -112,6 +112,8 @@ class SWHIndexingLister(SWHListerBase):
# indexable column from the ith row
index = self.db_session.query(self.MODEL.indexable) \
.order_by(self.MODEL.indexable).offset(i).first()
if index:
index = index[0]
if index is not None and prev_index is not None:
partitions.append((prev_index, index))
prev_index = index