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 expression function to_yaml_string to handle mongodb base types #4720

Merged
merged 2 commits into from
Jun 24, 2019

Conversation

m4dcoder
Copy link
Contributor

Refactor the filter to_yaml_string used in YAQL/Jinja expressions to be able to handle mongodb base types such as BaseDict and BaseList. The filter will call a helper function to recursively convert BaseDict and BaseList to python dict and list respectively. Fixes #4700.

Refactor the filter to_yaml_string used in YAQL/Jinja expressions to be able to handle mongodb base types such as BaseDict and BaseList. The filter will call a helper function to recursively convert BaseDict and BaseList to python dict and list respectively.
@m4dcoder m4dcoder requested review from blag and jinpingh June 22, 2019 18:02
Use if-elif instead of multiple if statements to check types when converting from MongoDB BaseDict and BaseList to python dict and list types. Once the value is converted, use another if-elif block to recursively evaluate and convert the values of dict and list.
@m4dcoder m4dcoder merged commit e5da173 into master Jun 24, 2019
@m4dcoder m4dcoder deleted the fix-to-yaml-str branch June 24, 2019 20:57
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.

Orquesta - Unable to serialize list objects
2 participants