Skip to content

Commit

Permalink
fix all product category repositories issues
Browse files Browse the repository at this point in the history
adrien2p committed Nov 13, 2024
1 parent b28e016 commit a6a02c2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/modules/product/src/repositories/product-category.ts
Original file line number Diff line number Diff line change
@@ -584,7 +584,9 @@ export class ProductCategoryRepository extends DALUtils.MikroOrmBaseTreeReposito
}

if (originalSibling.rank < updatedSibling.rank) {
const siblings = await manager.find(
const siblings = await manager.find<
InferEntityType<typeof ProductCategory>
>(
ProductCategory.name,
{
parent_category_id: originalSibling.parent_category_id,
@@ -600,7 +602,9 @@ export class ProductCategoryRepository extends DALUtils.MikroOrmBaseTreeReposito

manager.persist(updatedSiblings)
} else {
const siblings = await manager.find(
const siblings = await manager.find<
InferEntityType<typeof ProductCategory>
>(
ProductCategory.name,
{
parent_category_id: originalSibling.parent_category_id,

0 comments on commit a6a02c2

Please sign in to comment.