dashboard/app: fix linter warnings

This commit is contained in:
Dmitry Vyukov 2020-04-29 15:40:37 +02:00
parent 496a08ae32
commit 08bed8d769
2 changed files with 3 additions and 8 deletions

View File

@ -104,11 +104,6 @@ type uiNamespace struct {
Caption string
}
type uiRedirect struct {
From string
To string
}
type cookieData struct {
Namespace string `json:"namespace"`
}

View File

@ -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