Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Admin UI] Optional custom fields of type int get populated with 0 instead of null #2361

Closed
seminarian opened this issue Aug 24, 2023 · 0 comments
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@seminarian
Copy link
Contributor

Describe the bug
Optional custom fields of type int get populated with 0 instead of null

To Reproduce
Steps to reproduce the behavior:

    config.customFields.Product.push({
      name: 'numberOfPhotos',
      label: [
        {
          languageCode: LanguageCode.en,
          value: 'Number of photos',
        },
      ],
      type: 'int',
    });

It shows up in the Admin UI but when creating a new product and not filling in this specific custom field the Admin UI does send it with value 0
On the edit product screen the value 0 is indeed shown while actually it should just be empty.

Expected behavior
If an optional custom field of type int is not filled in null should be sent to server

Environment (please complete the following information):

  • @vendure/core version: 2.0.3
  • Nodejs version: v16.19.0
  • Database (mysql/postgres etc): postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants