Skip to content

Commit

Permalink
fix(elasticsearch-plugin): 🐛 Fix relation on customfields for product…
Browse files Browse the repository at this point in the history
…s and variants
  • Loading branch information
giosueDelgado committed Jan 23, 2024
1 parent 955493c commit 77c10f2
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes
let product: Product | undefined;
try {
product = await this.connection
.rawConnection
.getRepository(Product)
.getRepository(ctx, Product)
.find({
relationLoadStrategy: 'query',
where: {id: productId, deletedAt: IsNull()},
Expand All @@ -516,8 +515,8 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes
}
if (!product)
return;

const updatedProductVariants = await this.connection.rawConnection.getRepository(ProductVariant).find({
const updatedProductVariants = await this.connection.getRepository(ctx, ProductVariant).find({
relations: this.variantRelations,
where: {
productId,
Expand Down

0 comments on commit 77c10f2

Please sign in to comment.