mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-11-30 13:20:40 +03:00
wip: add import endpoint
This commit is contained in:
@@ -27,11 +27,7 @@ class Stuff(Base):
|
||||
:param name:
|
||||
:return:
|
||||
"""
|
||||
stmt = (
|
||||
select(cls)
|
||||
.options(joinedload(cls.nonsense))
|
||||
.where(cls.name == name)
|
||||
)
|
||||
stmt = select(cls).options(joinedload(cls.nonsense)).where(cls.name == name)
|
||||
result = await db_session.execute(stmt)
|
||||
instance = result.scalars().first()
|
||||
if instance is None:
|
||||
|
||||
Reference in New Issue
Block a user