Show district branding on status page
This commit is contained in:
parent
28ade30d2b
commit
5802fe4fd3
1 changed files with 17 additions and 0 deletions
|
|
@ -112,6 +112,14 @@ func contentFromNuisance(ctx context.Context, report_id string) (result ContentS
|
|||
return result, fmt.Errorf("Failed to get images %s: %w", report_id, err)
|
||||
}
|
||||
|
||||
if !nuisance.OrganizationID.IsNull() {
|
||||
org_id := nuisance.OrganizationID.MustGet()
|
||||
org, err := models.FindOrganization(ctx, db.PGInstance.BobDB, org_id)
|
||||
if err != nil {
|
||||
return result, fmt.Errorf("Failed to get district %d information: %w", org_id, err)
|
||||
}
|
||||
result.District = newContentDistrict(org)
|
||||
}
|
||||
result.Report.ID = report_id
|
||||
result.Report.Address = nuisance.Address
|
||||
result.Report.Created = nuisance.Created
|
||||
|
|
@ -210,6 +218,15 @@ func contentFromPool(ctx context.Context, report_id string) (result ContentStatu
|
|||
return result, fmt.Errorf("Failed to get images %s: %w", report_id, err)
|
||||
}
|
||||
|
||||
if !pool.OrganizationID.IsNull() {
|
||||
org_id := pool.OrganizationID.MustGet()
|
||||
org, err := models.FindOrganization(ctx, db.PGInstance.BobDB, org_id)
|
||||
if err != nil {
|
||||
return result, fmt.Errorf("Failed to get district %d information: %w", org_id, err)
|
||||
}
|
||||
result.District = newContentDistrict(org)
|
||||
}
|
||||
|
||||
result.Report.ID = report_id
|
||||
result.Report.Address = pool.Address
|
||||
result.Report.Created = pool.Created
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue