Skip to content

Inventory dataset form: optional field gives json export error if left blank #5434

@FuhuXia

Description

@FuhuXia

When adding a resource in inventory dataset form, if the field "Format", which is marked optiojnal, is left blank, it gives an error during json export.

Image

How to reproduce

  • add a resource to a dataset
  • choose "Link to a file" as the resource type, leave the format field blank.
  • export the datajson for the org.

Expected behavior

json is exported without error

Actual behavior

An error for the dataset during export,

'required': ['mediaType']

Sketch

User reported this issue. #5415 (comment)

Metadata

Metadata

Labels

Inventory.data.govInventory playbooks/rolesbugSoftware defect or bug

Type

No type
No fields configured for issues without a type.

Projects

Status
✔ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions