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

TOI object cannot roundtrip via json #427

Closed
mwcraig opened this issue Aug 14, 2024 · 0 comments · Fixed by #428
Closed

TOI object cannot roundtrip via json #427

mwcraig opened this issue Aug 14, 2024 · 0 comments · Fixed by #428
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mwcraig
Copy link
Contributor

mwcraig commented Aug 14, 2024

PR to fix is incoming, but this code reproduces the bug:

from stellarphot.io import TOI
toi = TOI.from_tic_id(236158940)
toi_json = TOI.model_dump_json()
# Failure happens in the line below 
new_toi = TOI.model_validate_json(toi_json)

assert new_toi == toi
@mwcraig mwcraig added the bug Something isn't working label Aug 14, 2024
@mwcraig mwcraig added this to the 2.0.0-beta milestone Aug 14, 2024
@mwcraig mwcraig self-assigned this Aug 14, 2024
mwcraig added a commit to mwcraig/stellarphot that referenced this issue Aug 14, 2024
mwcraig added a commit that referenced this issue Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant