More debugging for CSV import

This commit is contained in:
Eli Ribble 2026-04-16 02:46:55 +00:00
parent f5ac7bb4ee
commit 82dd5e8683
No known key found for this signature in database

View file

@ -190,6 +190,9 @@ func parseCSVPoollist(ctx context.Context, txn bob.Tx, f *models.FileuploadFile,
})
return pools, nil
}
for i, header_name := range header_names {
log.Debug().Int("index", i).Str("name", header_name).Send()
}
// Start at 2 because the header is line 1, not line 0
line_number := int32(2)
for {
@ -233,6 +236,8 @@ func parseCSVPoollist(ctx context.Context, txn bob.Tx, f *models.FileuploadFile,
continue
}
switch hdr_t {
case headerPoolUnknown:
log.Error().Int("i", i).Str("col", col).Int32("line", line_number).Msg("unknown header. This should never happen.")
case headerPoolAddressLocality:
setter.AddressLocality = omit.From(col)
case headerPoolAddressPostalCode: