feat(profile): expose default_document_language in profile API and UI
- Add default_document_language to ProfileResponse and ProfileUpdateRequest - Handle validation in PATCH /api/profile endpoint - Add dropdown in profile.html template with Alpine.js binding - Add translation keys for profile UI labels - Add comprehensive tests for profile default language feature Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@ _MAX_TRANSLATION_INPUT = 50_000
|
||||
def _get_file_or_404(db: Session, file_id: int, request: Request) -> FileRecord:
|
||||
"""Fetch a FileRecord visible to the current user or raise 404."""
|
||||
query = db.query(FileRecord).filter(FileRecord.id == file_id)
|
||||
owner_id = get_current_owner_id(request, db)
|
||||
owner_id = get_current_owner_id(request)
|
||||
if owner_id:
|
||||
query = apply_owner_filter(query, owner_id, FileRecord)
|
||||
record = query.first()
|
||||
|
||||
Reference in New Issue
Block a user