-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Describe the bug
When you create a metadata key value in the admin dashboard where the value is Boolean, e.g. can_ship=true, the resulting key/value is treated as a string where true is "true" not Boolean (checkbox in the UI). This is different than when you create a boolean key/value via the API, where the boolean value becomes a real boolean and the UI shows a checkbox.
Solution would be: When you create a boolean key/value in the dashboard, where the value is either marked as true/false, the backend code should properly save these as boolean, and not strings. I haven't looked at the code yet where the key/value is stored, but probably you just need to check for true/false from the form and then save those as true booleans, as opposed to strings.
To Reproduce
Log into the dashboard, and create the metadata key/value in the dashboard itself with "true" or "false" as the values for the key. The boolean values become string and the UI shows a string as an edit. Conversely create the metadata key/value via the API and use "true" or "false" as the values and you will get a proper key/value with boolean and a checkmark in the UI.
System
Any dashboard app key/value
Additional context
No response