diff --git a/app/models/service/aggregation.rb b/app/models/service/aggregation.rb index ebe24084906..9c777701287 100644 --- a/app/models/service/aggregation.rb +++ b/app/models/service/aggregation.rb @@ -149,7 +149,7 @@ def aggregate_hardware_arel(virtual_column_name, aggregation_sql, options = {}) def aggregation_where_clause(arel, subtree_services) arel.grouping( subtree_services[:id].eq(arel[:id]) - .or(subtree_services[:ancestry].matches(ancestry_ilike)) + .or(subtree_services[:ancestry].matches(ancestry_ilike, nil, true)) ).or(subtree_services[:ancestry].eq(service_id_cast)) end