Fix missing date_of_birth in admin user detail API response

UserDetailResponse was built from UserListItem (which excludes
date_of_birth), so the field always returned null. Explicitly
pass user.date_of_birth to the response constructor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kyle 2026-03-03 01:42:06 +08:00
parent 3a456e56dd
commit da61676fef

View File

@ -180,6 +180,7 @@ async def get_user(
**UserListItem.model_validate(user).model_dump(exclude={"active_sessions"}),
active_sessions=active_sessions,
preferred_name=preferred_name,
date_of_birth=user.date_of_birth,
)