Return communication database rows from communication API

This is a pretty big refactor of how communication works to start moving
us in the direction we want to go long-term. This adds the new
communication row and migrates existing reports to add rows for
communication.

There's also a bunch of automatic fixes from the new linter. I should
have added them separately, but whatever.
This commit is contained in:
Eli Ribble 2026-05-01 20:49:37 +00:00
parent a6ce0b7e67
commit a82732a49c
No known key found for this signature in database
41 changed files with 365 additions and 220 deletions

View file

@ -156,7 +156,7 @@ func geocodePool(ctx context.Context, txn bob.Tx, client *stadia.StadiaMaps, job
return nil
}
if geo.Address.Location == nil {
addError(ctx, txn, job.csv, pool.LineNumber, 0, fmt.Sprintf("nil location from geocoding"))
addError(ctx, txn, job.csv, pool.LineNumber, 0, "nil location from geocoding")
return nil
}
geom_query := geom.PostgisPointQuery(*geo.Address.Location)
@ -329,7 +329,7 @@ func parseHeaders(row []string) ([]headerPoolEnum, []string) {
ht := strings.TrimSpace(h)
hl := strings.ToLower(ht)
log.Debug().Str("header", hl).Msg("Saw CSV header")
var type_ headerPoolEnum = headerPoolTag
var type_ = headerPoolTag
switch hl {
case "city":
type_ = headerPoolAddressLocality