Fix logic error in insert_many

This commit is contained in:
Abdurrahmaan Iqbal 2019-07-09 09:45:18 +01:00
parent 82c6cdc990
commit 6874889591

View File

@ -139,7 +139,7 @@ class Table(object):
chunk.append(row) chunk.append(row)
# Insert when chunk_size is fulfilled or this is the last row # Insert when chunk_size is fulfilled or this is the last row
if len(chunk) == chunk_size or index == len(row) - 1: if len(chunk) == chunk_size or index == len(rows) - 1:
chunk = pad_chunk_columns(chunk, columns) chunk = pad_chunk_columns(chunk, columns)
self.table.insert().execute(chunk) self.table.insert().execute(chunk)
chunk = [] chunk = []