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

Zero-length string for name of enumtype members is not supported #31

Open
rroos80 opened this issue Aug 27, 2018 · 0 comments
Open

Zero-length string for name of enumtype members is not supported #31

rroos80 opened this issue Aug 27, 2018 · 0 comments

Comments

@rroos80
Copy link

rroos80 commented Aug 27, 2018

In metadata.py, get_entity_sets() will create EnumTypes for all name/value pairs of enumtype members.

If the name of the enumtype memer is a zero-length string, creating the enumtype will cause an exception as _is_sunder() in enum.py cannot check for name[0] as it doesn't exist.

I'm not quite sure where the best place would be to fix this. I'm currently using a workaround of converting the name of the enumtype to a single space character, but that's obviously not quite right.

I don't have any control over the OData interface I'm querying, and I'm at a loss of why someone would name a Enumtype member with a zero length string in the first place, but this is what I'm dealing with. Any suggestions welcome!

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

No branches or pull requests

1 participant