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

conform_record_data_types is not recursive #800

Closed
Jack-Burnett opened this issue Jul 8, 2022 · 3 comments · Fixed by #887
Closed

conform_record_data_types is not recursive #800

Jack-Burnett opened this issue Jul 8, 2022 · 3 comments · Fixed by #887

Comments

@Jack-Burnett
Copy link
Contributor

_typing.py has the function conform_record_data_types.
But it only iterates over the top level properties of the object, not any nested properties.

This has two negative consequences;

  • Types are not normalised for nested values (For example, I am outputting lists of objects with dates on, and those dates are not normalised to strings by the sdk. This causes an error when it later tries to convert them to json).
  • The check that a property exists in the schema would not be performed for any nested fields either
@edgarrmondragon
Copy link
Collaborator

Hi @Jack-Burnett, thanks for reporting. I agree, and it's probably a bug since it's unexpected behavior. PRs are welcome 😄

@Jack-Burnett
Copy link
Contributor Author

Great, I'll see if I can cleanup the fix I used in my tap and submit it as a PR (probably won't be for a couple weeks at least though).

@edgarrmondragon
Copy link
Collaborator

@Jack-Burnett No worries, and thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants