awaitable_attrs in sqlmodel v 0.0.24 not available #1400
Unanswered
20-buck-spin
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
I have a toy Fast API project (using sqlmodel for db interactions) with an endpoint that returns a user's groups. This works fine in 0.0.22 but when using 0.0.24 I get an Attribute error (see below) . I tried looking for info about awaitable attrs in the release notes but couldn't find anything.
I understand I can do selectinload / joinedload etc to solve my issue in this instance. Was the behaviour of lazy loading (in an async context) changed? If so, how can it be done now?
File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 989, in getattr
raise AttributeError(f'{type(self).name!r} object has no attribute {item!r}')
AttributeError: 'User' object has no attribute 'awaitable_attrs'
Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.24
Python Version
3.12
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions