From 5802fe4fd31290c0817ffcacefadafae17f36907 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 10 Feb 2026 14:55:59 +0000 Subject: [PATCH] Show district branding on status page --- rmo/status.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/rmo/status.go b/rmo/status.go index d13cf2c0..032b1ee5 100644 --- a/rmo/status.go +++ b/rmo/status.go @@ -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