Skip to content

Commit

Permalink
Remove 2nd parameter to BySlugVendorModel
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax committed Sep 19, 2023
1 parent 8596d91 commit 69822ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/model/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Component struct {
type Components []*Component

// BySlug returns a component that matches the slug value.
func (c Components) BySlugVendorModel(cSlug, _ string, cModels []string) *Component {
func (c Components) BySlugVendorModel(cSlug string, cModels []string) *Component {
for idx, component := range c {
// skip non matching component slug
if !strings.EqualFold(cSlug, component.Slug) {
Expand Down
2 changes: 1 addition & 1 deletion internal/outofband/action_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (h *actionHandler) checkCurrentFirmware(a sw.StateSwitch, c sw.TransitionAr
return err
}

component := components.BySlugVendorModel(action.Firmware.Component, action.Firmware.Vendor, action.Firmware.Models)
component := components.BySlugVendorModel(action.Firmware.Component, action.Firmware.Models)
if component == nil {
tctx.Logger.WithFields(
logrus.Fields{
Expand Down

0 comments on commit 69822ff

Please sign in to comment.