fix: Resolve issue with sqlite on Ubuntu24.04

This commit is contained in:
Igor Ilic 2025-06-05 19:27:09 +02:00
parent 3dced5f16e
commit 463b360740

View file

@ -1,6 +1,6 @@
from uuid import UUID from uuid import UUID
from sqlalchemy import select from sqlalchemy import select
from sqlalchemy.orm import joinedload from sqlalchemy.orm import selectinload
import sqlalchemy.exc import sqlalchemy.exc
from cognee.infrastructure.databases.relational import get_relational_engine from cognee.infrastructure.databases.relational import get_relational_engine
from cognee.infrastructure.databases.exceptions import EntityNotFoundError from cognee.infrastructure.databases.exceptions import EntityNotFoundError
@ -14,7 +14,7 @@ async def get_user(user_id: UUID):
user = ( user = (
await session.execute( await session.execute(
select(User) select(User)
.options(joinedload(User.roles), joinedload(User.tenant)) .options(selectinload(User.roles), selectinload(User.tenant))
.where(User.id == user_id) .where(User.id == user_id)
) )
).scalar() ).scalar()