remove unnecessary ID filtering logic

pull/12585/head
Jade McGough 2019-03-12 17:05:37 -07:00
parent 0e5e2a5703
commit 334b9ec0ae
2 changed files with 0 additions and 9 deletions

View File

@ -96,14 +96,6 @@ func (s *Service) FindLabelByID(ctx context.Context, id influxdb.ID) (*influxdb.
// FindLabels will retrieve a list of labels from storage.
func (s *Service) FindLabels(ctx context.Context, filter influxdb.LabelFilter, opt ...influxdb.FindOptions) ([]*influxdb.Label, error) {
if filter.ID.Valid() {
l, err := s.FindLabelByID(ctx, filter.ID)
if err != nil {
return nil, err
}
return []*influxdb.Label{l}, nil
}
filterFunc := func(label *influxdb.Label) bool {
return (filter.Name == "" || (filter.Name == label.Name))
}

View File

@ -104,7 +104,6 @@ type LabelUpdate struct {
// LabelFilter represents a set of filters that restrict the returned results.
type LabelFilter struct {
ID ID
Name string
}