diff --git a/openmeter/productcatalog/adapter/feature.go b/openmeter/productcatalog/adapter/feature.go index 43f991352..1cd1ad733 100644 --- a/openmeter/productcatalog/adapter/feature.go +++ b/openmeter/productcatalog/adapter/feature.go @@ -109,13 +109,11 @@ func (c *featureDBAdapter) ListFeatures(ctx context.Context, params feature.List Where(db_feature.Namespace(params.Namespace)) if len(params.MeterSlugs) > 0 { - query.Where(db_feature.MeterSlugIn(params.MeterSlugs...)) + query = query.Where(db_feature.MeterSlugIn(params.MeterSlugs...)) } if len(params.IDsOrKeys) > 0 { - for _, idOrKey := range params.IDsOrKeys { - query.Where(db_feature.Or(db_feature.Key(idOrKey), db_feature.ID(idOrKey))) - } + query = query.Where(db_feature.Or(db_feature.IDIn(params.IDsOrKeys...), db_feature.KeyIn(params.IDsOrKeys...))) } if !params.IncludeArchived {