Skip to content

Commit

Permalink
Clean custom serach filter with builtin (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpedrosa authored Sep 22, 2023
1 parent 66f7516 commit c72349c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routeros/resource_interface_ethernet.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ func NoOpDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag

func findInterfaceByDefaultName(s map[string]*schema.Schema, d *schema.ResourceData, c Client) (MikrotikItem, error) {
metadata := GetMetadata(s)
filter := fmt.Sprintf("default-name=%s", d.Get("factory_name"))
items, err := ReadItemsFiltered([]string{filter}, metadata.Path, c)
filter := buildReadFilter(map[string]interface{}{"default-name": d.Get("factory_name")})
items, err := ReadItemsFiltered(filter, metadata.Path, c)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit c72349c

Please sign in to comment.