Guard transform when --detect-types CSV has only a header row (closes #702)

This commit is contained in:
guzenkopavel 2026-05-04 12:18:23 +07:00
commit 633414a556
2 changed files with 16 additions and 1 deletions

View file

@ -1176,7 +1176,7 @@ def insert_upsert_implementation(
)
else:
raise
if tracker is not None:
if tracker is not None and db.table(table).exists():
db.table(table).transform(types=tracker.types)
# Clean up open file-like objects