-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Describe the bug
According to image widgets docs, widget's default value is null
. But when I try to save a record without choosing any image, it just omits the property completely.
To Reproduce
- Try to create a new record without selecting any image
- Check that newly created json won't have
image
field at all
Expected behavior
If image hasn't been provided, image
property should have null
as a value
Applicable Versions:
System:
OS: macOS 10.15.7
Binaries:
Node: 14.17.1 - /usr/local/opt/node@14/bin/node
npm: 7.19.0 - /usr/local/bin/npm
npmPackages:
netlify-cms-app => 2.15.20
CMS configuration
backend:
name: git-gateway
media_folder: /static/images
public_folder: /images
collections:
- label: Pictures
name: pictures
folder: content/pictures
format: json
create: true
media_folder: '{{media_folder}}/pictures'
public_folder: '{{public_folder}}/pictures'
fields:
- { label: Title, name: title, widget: string }
- { label: Image, name: image, widget: image, required: false }
P.S. If it's not something obvious or expected behaviour, I can create minimal example to demonstrate the issue
Metadata
Metadata
Assignees
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped code