medusajs / medusa

Building blocks for digital commerce
https://medusajs.com
MIT License
23.94k stars 2.32k forks source link

Edit Variant form save throws error #6841

Open xyzones opened 3 months ago

xyzones commented 3 months ago

Steps to reproduce

Error is shown

Screenshot 2024-03-27 at 13 29 09

However if in the variants section you edit the variant and do the same no errors

https://github.com/medusajs/medusa/assets/1039118/a286a876-30b4-4e0f-8ef4-3d7e414422c6

error

error:   property stock_location should not exist
Error: property stock_location should not exist
    at /Users/xxx/backend/node_modules/@medusajs/medusa/dist/utils/validator.js:153:31
    at step (/Users/xxx/backend/node_modules/@medusajs/medusa/dist/utils/validator.js:44:23)
    at Object.next (/Users/xxx/backend/node_modules/@medusajs/medusa/dist/utils/validator.js:25:53)
    at fulfilled (/Users/xxx/backend/node_modules/@medusajs/medusa/dist/utils/validator.js:16:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'invalid_data',
  code: undefined,
  date: 2024-03-27T12:30:25.706Z
}

env

# medusa -v
Medusa CLI version: 1.3.22
Medusa version: 1.20.1
# npm ls
medusa-starter-default@0.0.1 /Users/xxx/backend
├── @babel/cli@7.23.9
├── @babel/core@7.23.9
├── @babel/preset-typescript@7.23.3
├── @medusajs/admin@7.1.10
├── @medusajs/cache-inmemory@1.8.10
├── @medusajs/cache-redis@1.9.0
├── @medusajs/event-bus-local@1.9.8
├── @medusajs/event-bus-redis@1.8.11
├── @medusajs/file-local@1.0.3
├── @medusajs/medusa-cli@1.3.22
├── @medusajs/medusa@1.20.1
├── @tanstack/react-query@4.22.0
├── @types/express@4.17.21
├── @types/jest@27.5.2
├── @types/node@17.0.45
├── babel-preset-medusa-package@1.1.19
├── body-parser@1.20.2
├── cors@2.8.5
├── cross-env@7.0.3
├── dotenv@16.3.1
├── eslint@6.8.0
├── express@4.18.2
├── jest@27.5.1
├── medusa-file-s3@1.4.1
├── medusa-fulfillment-manual@1.1.39
├── medusa-interfaces@1.3.8
├── medusa-payment-manual@1.0.24
├── medusa-payment-stripe@6.0.7
├── medusa-plugin-directus@0.0.1 extraneous -> ./../medusa-plugin-directus
├── medusa-plugin-meilisearch@2.0.10
├── prism-react-renderer@2.3.1
├── rimraf@3.0.2
├── ts-jest@27.1.5
├── ts-loader@9.5.1
├── typeorm@0.3.20
└── typescript@4.9.5
MohmDev commented 2 weeks ago

I have the exact same issue.