-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enums not reflect in object response #944
Comments
I agree that converting the values back into enums would be a nice feature. I wonder if it should be a default behaviour, or configurable in some way (maybe via the To make the enum comparable to the raw string value you can do this: # Note - it inherits from `str`
class ReindexStatus(str, Enum):
ready_to_start = 'ready_to_start'
started = 'started' |
I would argue that it should be the default value, since the Thanks for the trick, I'll play with that! |
Given this model:
if I do a query like
I would expect to be able to use the enum class to compare the object field value like:
However, the field seems to be returned just as a string.
This seems like a bug to me, is it intentional that enum-based fields aren't deserialized back to the enum?
The text was updated successfully, but these errors were encountered: