Просмотр исходного кода

fix(elasticsearch-plugin): Fix aggregation buckets with taxes (#2749)

Co-authored-by: Alessio Marano <alessio.marano@sardexpay.net>
Alessio Marano 1 год назад
Родитель
Сommit
c23993c801
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/elasticsearch-plugin/src/elasticsearch.service.ts

+ 1 - 1
packages/elasticsearch-plugin/src/elasticsearch.service.ts

@@ -475,7 +475,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy {
                 max: aggregations.maxPriceWithTax.value || 0,
                 max: aggregations.maxPriceWithTax.value || 0,
             },
             },
             buckets: aggregations.prices.buckets.map(mapPriceBuckets).filter(x => 0 < x.count),
             buckets: aggregations.prices.buckets.map(mapPriceBuckets).filter(x => 0 < x.count),
-            bucketsWithTax: aggregations.prices.buckets.map(mapPriceBuckets).filter(x => 0 < x.count),
+            bucketsWithTax: aggregations.pricesWithTax.buckets.map(mapPriceBuckets).filter(x => 0 < x.count),
         };
         };
     }
     }