-
Notifications
You must be signed in to change notification settings - Fork 766
A Slightly smarter enum conversion #654
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
Conversation
5 similar comments
The enum converter now strips non-ascii characters as the graphene does not support non-ascii enum names. |
Will now prefix choices with "A" if it starts with an underscore. That is to fix #141 |
Realized that #23 specifically opted to use values for enum generation as they are less likely to change. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Tweaks the enum generator for the django model field converter. When generating an enum name, if the choice value is not a string then use the choice label instead. The result is smarter enum labels for integer fields. Check out the changes in unit testing as an example of better usage.
Not backwards compatible.
Partially addresses #649