Enum fields can have a type, for example set to integer, but are currently always being submitted as strings.
This fix just mirrors the parsing and normalizing logic from other type of fields. Actually, since the values can never be entered by the user, parsing shouldn't be necessary (but I left it in for symmetry).
An alternative way of fixing this would be to do a type-agnostic lookup in the enumerated values from the schema, and return that one (it should have the proper type). But I like the submitted fix better.
Enum fields can have a type, for example set to
integer
, but are currently always being submitted as strings.This fix just mirrors the parsing and normalizing logic from other type of fields. Actually, since the values can never be entered by the user, parsing shouldn't be necessary (but I left it in for symmetry).
An alternative way of fixing this would be to do a type-agnostic lookup in the enumerated values from the schema, and return that one (it should have the proper type). But I like the submitted fix better.