teszt állományok áthelyezése és szelektálása
This commit is contained in:
@@ -70,12 +70,14 @@ async def get_current_user(
|
||||
# We need to load the person relationship to avoid lazy loading issues
|
||||
# Also load Person.address for nested profile response
|
||||
from app.models.identity import Person
|
||||
from app.models.identity.address import Address
|
||||
from app.models.identity.address import Address, GeoPostalCode
|
||||
stmt = (
|
||||
select(User)
|
||||
.where(User.id == int(user_id))
|
||||
.options(
|
||||
joinedload(User.person).joinedload(Person.address)
|
||||
joinedload(User.person)
|
||||
.joinedload(Person.address)
|
||||
.joinedload(Address.postal_code) # <-- EZ KELL IDE: postal_code eager loading a zip/city property-khez
|
||||
)
|
||||
)
|
||||
result = await db.execute(stmt)
|
||||
|
||||
@@ -242,6 +242,9 @@ async def update_my_person(
|
||||
street_name=update_dict.get("address_street_name"),
|
||||
street_type=update_dict.get("address_street_type"),
|
||||
house_number=update_dict.get("address_house_number"),
|
||||
stairwell=update_dict.get("address_stairwell"),
|
||||
floor=update_dict.get("address_floor"),
|
||||
door=update_dict.get("address_door"),
|
||||
parcel_id=update_dict.get("address_hrsz"),
|
||||
)
|
||||
if addr_id:
|
||||
|
||||
Reference in New Issue
Block a user