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

Need enum name in escaped value #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sdransfeld
Copy link

When we query MS Dynamics with odata, we need the enum name in the escaped value. Now we get:
https://mg-prod.operations.dynamics.com/data/Projects?$filter=ProjectStage eq ProjStatus.InProcess
but we need
https://mg-prod.operations.dynamics.com/data/Projects?$filter=ProjectStage eq Microsoft.Dynamics.DataEntities.ProjStatus'InProcess'

So in addition to this patch, when we reflect we also need to get the fully qualified name into the enum. Not:
Enum("ProjStatus", ...)
but:
Enum("Microsoft.Dynamics.DataEntities.ProjStatus", ...)

And I guess that
ProjectStage: str = EnumTypeProperty("ProjectStage", enum_class=ProjStatus)
should be
ProjectStage: Enum = EnumTypeProperty("ProjectStage", enum_class=ProjStatus)
?

If you don't have access to a system with enums, I can test changes if you need any.

@eblis
Copy link
Owner

eblis commented Dec 7, 2024

I don't have access to a system with enums unfortunately.

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.

2 participants