2026.06.05 frontend javítgatás és új belépési logika megvalósítva
This commit is contained in:
@@ -68,7 +68,16 @@ async def get_current_user(
|
||||
|
||||
# JAVÍTVA: Modern SQLAlchemy 2.0 aszinkron lekérdezés with eager loading
|
||||
# We need to load the person relationship to avoid lazy loading issues
|
||||
stmt = select(User).where(User.id == int(user_id)).options(joinedload(User.person))
|
||||
# Also load Person.address for nested profile response
|
||||
from app.models.identity import Person
|
||||
from app.models.identity.address import Address
|
||||
stmt = (
|
||||
select(User)
|
||||
.where(User.id == int(user_id))
|
||||
.options(
|
||||
joinedload(User.person).joinedload(Person.address)
|
||||
)
|
||||
)
|
||||
result = await db.execute(stmt)
|
||||
user = result.unique().scalar_one_or_none()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user