Uh oh!
There was an error while loading. Please reload this page.
✨ 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 |
tiangolo
commented
Oct 23, 2023
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. 🤓 |
ddanier
commented
Oct 23, 2023
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.