chore(): Upgrade mikro orm (#13390)
* chore(): Upgrade mikro orm * handle 'null' value for big number props * 6.5.2 * remove only * fix pricing module rule value * switch select in strategy for balances * revert to select in strategy for order module * fix defining DML ManyToOne * fix define relationship * test fix * more fixes * change order strategy to balanced * change order strategy to balanced * prevent unnecessary manager fork * revert generated www changes * remove unnecessary changes * Create real-cobras-deny.md * address feedback --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Oli Juhl
parent
fc4d5f0ac9
commit
a095245d71
@@ -62,7 +62,7 @@ export class ProductCategoryRepository extends DALUtils.MikroOrmBaseTreeReposito
|
||||
}
|
||||
|
||||
Object.assign(findOptions_.options, {
|
||||
strategy: LoadStrategy.SELECT_IN,
|
||||
strategy: LoadStrategy.BALANCED,
|
||||
})
|
||||
|
||||
return findOptions_
|
||||
|
||||
@@ -1822,6 +1822,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