This reverts commit a095245d71.
This commit is contained in:
1 parent
ccff121691
commit
0b55295fc7
60 files changed
+711
-862
No files matched your search
+1
-6
@@ -864,12 +864,7 @@ moduleIntegrationTestRunner<IProductModuleService>({
|
||||
await service.upsertProducts([updateData])
|
||||
|
||||
const product = await service.retrieveProduct(productTwo.id, {
|
||||
relations: [
|
||||
"options",
|
||||
"options.values",
|
||||
"variants",
|
||||
"variants.options",
|
||||
],
|
||||
relations: ["*"],
|
||||
})
|
||||
|
||||
expect(product.options).toHaveLength(1)
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.10.1",
|
||||
"@medusajs/test-utils": "2.10.1",
|
||||
"@mikro-orm/cli": "6.5.2",
|
||||
"@mikro-orm/core": "6.5.2",
|
||||
"@mikro-orm/migrations": "6.5.2",
|
||||
"@mikro-orm/postgresql": "6.5.2",
|
||||
"@mikro-orm/cli": "6.4.3",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
"@mikro-orm/postgresql": "6.4.3",
|
||||
"@swc/core": "^1.7.28",
|
||||
"@swc/jest": "^0.2.36",
|
||||
"faker": "^5.5.3",
|
||||
@@ -52,9 +52,9 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.10.1",
|
||||
"@mikro-orm/core": "6.5.2",
|
||||
"@mikro-orm/migrations": "6.5.2",
|
||||
"@mikro-orm/postgresql": "6.5.2",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
"@mikro-orm/postgresql": "6.4.3",
|
||||
"awilix": "^8.0.1"
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ export class ProductCategoryRepository extends DALUtils.MikroOrmBaseTreeReposito
|
||||
}
|
||||
|
||||
Object.assign(findOptions_.options, {
|
||||
strategy: LoadStrategy.BALANCED,
|
||||
strategy: LoadStrategy.SELECT_IN,
|
||||
})
|
||||
|
||||
return findOptions_
|
||||
|
||||
@@ -1822,21 +1822,6 @@ export default class ProductModuleService
|
||||
productData.thumbnail = productData.images[0].url
|
||||
}
|
||||
|
||||
// TODO: these props are typed as number, the model expect a string, the API expect number etc
|
||||
// There is some inconsistency here, we should fix it
|
||||
if ("weight" in productData) {
|
||||
productData.weight = productData.weight?.toString() as any
|
||||
}
|
||||
if ("length" in productData) {
|
||||
productData.length = productData.length?.toString() as any
|
||||
}
|
||||
if ("height" in productData) {
|
||||
productData.height = productData.height?.toString() as any
|
||||
}
|
||||
if ("width" in productData) {
|
||||
productData.width = productData.width?.toString() as any
|
||||
}
|
||||
|
||||
if (productData.images?.length) {
|
||||
productData.images = productData.images.map((image, index) =>
|
||||
(image as { rank?: number }).rank != null
|
||||
|
||||
Reference in new issue
Block a user