Skip to content
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

fix: do not cast BackedEnum identifiers to int #1000

Open
wants to merge 1 commit into
base: 3.4.x
Choose a base branch
from

Conversation

Gwemox
Copy link

@Gwemox Gwemox commented Nov 25, 2022

Another way to solve #997
Thank's to @malarzm for the test (#998)

The applied solution: only cast to int if return value is not a instance of BackedEnum.
Another solution would be to check the return value is numeric (is_numeric) but if it is null it will change the behavior (null instead of 0)

@Gwemox Gwemox changed the title fix: do not cast BackedEnum identifiers fix: do not cast BackedEnum identifiers to int Nov 25, 2022
@Gwemox Gwemox force-pushed the fix/dont-cast-backedenum branch 4 times, most recently from 4c55779 to 1f02a2e Compare November 28, 2022 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant