wip: add import endpoint

This commit is contained in:
Jakub Miazek
2024-02-17 08:40:49 +01:00
parent cd3ce997d8
commit 101fa05515
3 changed files with 42 additions and 6 deletions

View File

@@ -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: