Describe the bug
Some const fields do not have type in the schema, which is causing the UI to display "Unknown field type undefined" warnings. This is confusing for users. Please note this is currently only seen when the const value is null. Const strings without a defined type seem to be showing up fine.
To Reproduce
This issue is seen whenever there are const fields that are null. For example, Manufacturers has many null const fields.
Steps to reproduce the behavior:
Describe the bug Some const fields do not have
type
in the schema, which is causing the UI to display "Unknown field type undefined" warnings. This is confusing for users. Please note this is currently only seen when the const value is null. Const strings without a definedtype
seem to be showing up fine.To Reproduce This issue is seen whenever there are const fields that are null. For example, Manufacturers has many null const fields. Steps to reproduce the behavior:
Expected behavior The field values should not be displayed at all if they are null.
Screenshots![image](https://github.com/AllenNeuralDynamics/aind-metadata-entry-js/assets/46795546/1c5b5e14-1587-4270-b024-cd35640d747d)
Additional context The underlying issue is related to https://github.com/AllenNeuralDynamics/aind-data-schema/discussions/822 and may be resolved with a newer pydantic release. In the future, we may want to check if this manual type check is still needed and remove it if not.
Additionally, in the UI there may be some non-null const fields whose values do not get displayed. This is a separate issue being tracked in #102