metadata: Fix cannot remove optional metadata_type
Hi, when I add an optional metadata_type into a document, then I need to remove it, the application complaint that metadata_type is flagged as required.
Step to reproduce:
- Add an optional metadata_type into a document_type
- add the metadata_type into a specific document
- remove that metadata_type by ticking the checkbox and click remove
Images attached
The last metadata_type is optional