* fix(inventory): cannot migrate existing products (#6877) * chore: add changeset (#6821) --------- Co-authored-by: Geoffroy Empain <geoffroy@charlie-bravo.be> Co-authored-by: Stevche Radevski <sradevski@live.com>
This commit is contained in:
5
.changeset/kind-feet-shake.md
Normal file
5
.changeset/kind-feet-shake.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
Fix logging error when trying to migrate products for enabling inventory module.
|
||||
@@ -134,7 +134,7 @@ const migrate = async function ({ directory }) {
|
||||
await processBatch(variants, defaultLocationId, container)
|
||||
|
||||
let processedCount = variants.length
|
||||
Logger.log(`Processed ${processedCount} of ${totalCount}`)
|
||||
Logger.info(`Processed ${processedCount} of ${totalCount}`)
|
||||
while (processedCount < totalCount) {
|
||||
const nextBatch = await variantService.list(
|
||||
{},
|
||||
@@ -148,10 +148,10 @@ const migrate = async function ({ directory }) {
|
||||
await processBatch(nextBatch, defaultLocationId, container)
|
||||
|
||||
processedCount += nextBatch.length
|
||||
Logger.log(`Processed ${processedCount} of ${totalCount}`)
|
||||
Logger.info(`Processed ${processedCount} of ${totalCount}`)
|
||||
}
|
||||
|
||||
Logger.log("Done")
|
||||
Logger.info("Done")
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user