chore(): Remove default limit from the build query (#9257)

* chore(): Remove default limit from the build query

* rm take: null

* fix tests

* fix tests

* fix db usage

* fix typo

* rm unsused template arg

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes
This commit is contained in:
Adrien de Peretti
2024-09-24 16:06:45 +02:00
committed by GitHub
parent 9e711720dd
commit 90d530565b
41 changed files with 549 additions and 224 deletions
@@ -204,7 +204,6 @@ export default class ProductModuleService
product_id: [...new Set<string>(data.map((v) => v.product_id!))],
},
{
take: null,
relations: ["values"],
},
sharedContext
@@ -326,7 +325,7 @@ export default class ProductModuleService
const variantIdsToUpdate = data.map(({ id }) => id)
const variants = await this.productVariantService_.list(
{ id: variantIdsToUpdate },
{ take: null },
{},
sharedContext
)
if (variants.length !== data.length) {
@@ -354,7 +353,7 @@ export default class ProductModuleService
new Set(variantsWithProductId.map((v) => v.product_id!))
),
},
{ take: null, relations: ["values"] },
{ relations: ["values"] },
sharedContext
)
@@ -791,7 +790,7 @@ export default class ProductModuleService
const dbOptions = await this.productOptionService_.list(
{ id: data.map(({ id }) => id) },
{ take: null, relations: ["values"] },
{ relations: ["values"] },
sharedContext
)
@@ -1553,7 +1552,7 @@ export default class ProductModuleService
if (product.variants?.length) {
allOptions = await this.productOptionService_.list(
{ product_id: upsertedProduct.id },
{ take: null, relations: ["values"] },
{ relations: ["values"] },
sharedContext
)
}
@@ -1641,7 +1640,7 @@ export default class ProductModuleService
if (productData.options?.length) {
const dbOptions = await this.productOptionService_.list(
{ product_id: productData.id },
{ take: null, relations: ["values"] },
{ relations: ["values"] },
sharedContext
)