-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
✨ Raise a more clear error when a type is not valid #425
Conversation
📝 Docs preview for commit 7967bcb at: https://630cda8afbefa94f41c70df1--sqlmodel.netlify.app |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #425 +/- ##
==========================================
- Coverage 98.49% 97.73% -0.77%
==========================================
Files 185 187 +2
Lines 5856 6212 +356
==========================================
+ Hits 5768 6071 +303
- Misses 88 141 +53
☔ View full report in Codecov by Sentry. |
📝 Docs preview for commit 55c10b5 at: https://630cfc073e4a7000b12222dd--sqlmodel.netlify.app |
Thanks! I updated the tests to use models, as that would be a realistic use case, then I fixed a small bug in the implementation detected by that. This will be available in the next release. 🤓 |
Thx for merging this! 🥳 |
Currently using
Dict[...]
,List[...]
orUnion[...]
will break with an error stating thatissubclass()
cannot be used for non types. This is something users won't understand and I think SQLModel should handle this in a better way.PR will fix the issue and contains a test to validate the code was broken before and is now fixed. The normal
ValueError(f"The field {field.name} has no matching SQLAlchemy type")
will then be raised.