Don't bail on district match early, check address

This is the other half of doing proper district match via raw address -
we have to use the address if available for looking up a district.
This commit is contained in:
Eli Ribble 2026-04-29 15:01:35 +00:00
parent 524353bfa1
commit 2fbceb11e3
No known key found for this signature in database
3 changed files with 35 additions and 14 deletions

View file

@ -330,7 +330,7 @@ func publicReportCreate(ctx context.Context, setter_report models.PublicreportRe
return nil, fmt.Errorf("Failed to save image uploads: %w", err)
}
if organization_id == 0 {
organization_id, err = matchDistrict(ctx, location, images)
organization_id, err = matchDistrict(ctx, location, images, addr)
if err != nil {
log.Warn().Err(err).Msg("Failed to match district")
}