vholik / medusa-custom-attributes

Plugin that extends MedusaJs with custom attributes API
88 stars 20 forks source link

Getting 'property attribute_values should not exist, property int_attribute_values should not exist' after adding custom attributing and trying to use it inside product #28

Open moheldesoqy opened 5 months ago

moheldesoqy commented 5 months ago

Hello!

this plugin was working just fine for me the other day, and today when i tried to check a new boolean attribute i added to my product, the console logs print:

error:   property attribute_values should not exist, property int_attribute_values should not exist
Error: property attribute_values should not exist, property int_attribute_values should not exist
    at /Users/moh/Projects/project/node_modules/@medusajs/medusa/dist/utils/validator.js:153:31
    at step (/Users/moh/Projects/project/node_modules/@medusajs/medusa/dist/utils/validator.js:44:23)
    at Object.next (/Users/moh/Projects/project/node_modules/@medusajs/medusa/dist/utils/validator.js:25:53)
    at fulfilled (/Users/moh/Projects/project/node_modules/@medusajs/medusa/dist/utils/validator.js:16:58) {
  type: 'invalid_data',
  code: undefined,
  date: 2024-04-23T11:31:04.208Z
}

any ideas?

vholik commented 5 months ago

Did you extend product validators? If so import you validator class from medusa-custom-attributes/dist/src/api/routes...