mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-25 10:24:32 +02:00
Fix for bug with extra columns in later chunks, closes #234
Thanks @nieuwenhoven for the fix, proposed in #225
This commit is contained in:
parent
f51a1f6c3c
commit
8f042ae1fd
2 changed files with 20 additions and 6 deletions
|
|
@ -1904,12 +1904,10 @@ class Table(Queryable):
|
|||
if hash_id:
|
||||
all_columns.insert(0, hash_id)
|
||||
else:
|
||||
all_columns += [
|
||||
column
|
||||
for record in chunk
|
||||
for column in record
|
||||
if column not in all_columns
|
||||
]
|
||||
for record in chunk:
|
||||
all_columns += [
|
||||
column for column in record if column not in all_columns
|
||||
]
|
||||
|
||||
validate_column_names(all_columns)
|
||||
first = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue