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:
parent
524353bfa1
commit
2fbceb11e3
3 changed files with 35 additions and 14 deletions
|
|
@ -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")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue