chore(): upgrade mikro orm (#13450)
This commit is contained in:
1 parent
4c1c1dd4c0
commit
8ece06d8ed
64 files changed
+836
-700
No files matched your search
@@ -61,7 +61,7 @@ export class ProductCategoryRepository extends DALUtils.MikroOrmBaseTreeReposito
|
||||
}
|
||||
|
||||
Object.assign(findOptions_.options, {
|
||||
strategy: LoadStrategy.SELECT_IN,
|
||||
strategy: LoadStrategy.BALANCED,
|
||||
})
|
||||
|
||||
return findOptions_
|
||||
|
||||
@@ -1879,6 +1879,21 @@ 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