From 08bed8d76911c9f004a2997c550687351faa52ce Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 29 Apr 2020 15:40:37 +0200 Subject: dashboard/app: fix linter warnings --- dashboard/app/handler.go | 5 ----- dashboard/app/reporting.go | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/dashboard/app/handler.go b/dashboard/app/handler.go index 62294811c..561547793 100644 --- a/dashboard/app/handler.go +++ b/dashboard/app/handler.go @@ -104,11 +104,6 @@ type uiNamespace struct { Caption string } -type uiRedirect struct { - From string - To string -} - type cookieData struct { Namespace string `json:"namespace"` } diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go index 52941e5db..7892b0b34 100644 --- a/dashboard/app/reporting.go +++ b/dashboard/app/reporting.go @@ -161,6 +161,9 @@ func reportingPollNotifications(c context.Context, typ string) []*dashapi.BugNot log.Infof(c, "fetched %v bugs", len(bugs)) var notifs []*dashapi.BugNotification for _, bug := range bugs { + if config.Namespaces[bug.Namespace].Decommissioned { + continue + } notif, err := handleReportNotif(c, typ, bug) if err != nil { log.Errorf(c, "%v: failed to create bug notif %v: %v", bug.Namespace, bug.Title, err) @@ -178,9 +181,6 @@ func reportingPollNotifications(c context.Context, typ string) []*dashapi.BugNot } func handleReportNotif(c context.Context, typ string, bug *Bug) (*dashapi.BugNotification, error) { - if config.Namespaces[bug.Namespace].Decommissioned { - return nil, nil - } reporting, bugReporting, _, _, err := currentReporting(c, bug) if err != nil || reporting == nil { return nil, nil -- cgit mrf-deployment