-
Notifications
You must be signed in to change notification settings - Fork 25
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
model: access doesn't survive R/T #343
Comments
we will likely need to hack it in our models for the time being through custom parsers for embedded types. there is an open issue around this issue (pydantic/pydantic#1409) that may soon see a PR. |
or should we just remove them for now ? (#344) ;) |
that's not the only place where the roundtrip will run into an issue. so removing them doesn't solve the issue. |
yes, but it is one of them so provides partial temporal workaround which would help to proceed ATM AFAIK. Sure thing if there is an alternative route which could resolve them in short term - we could go that way too (but waiting on PR in pydantic + release might take awhile) |
we definitely cannot wait for their PR, but we can change our models to support round tripping and exporting cleaner json. this is really about serialization and deserialization. |
btw, i did this check at the level of the model and this seems to work. i have to check how well it works with nested models:
|
also simple nesting works:
|
so you can see that it putates from
[{'status': <AccessType.Open: 'dandi:Open'>}]
to'access': [{'status': 'dandi:Open'}]
The text was updated successfully, but these errors were encountered: