Fix: PDF 매칭 저장 기능 수정

- 백엔드 문서 업데이트 API에서 DocumentResponse 생성자 수정
- original_filename 필드 추가로 PDF 매칭 정보 제대로 반환
- uploader 필드 null 체크 추가
- 프론트엔드 저장 과정에 상세 디버깅 로그 추가
- PDF 매칭 정보와 순서 저장 과정 로그 추가
This commit is contained in:
Hyungi Ahn
2025-09-03 18:10:42 +09:00
parent b5602cbf44
commit 8f12eb4f76
2 changed files with 15 additions and 5 deletions

View File

@@ -802,13 +802,14 @@ async def update_document(
created_at=document.created_at,
updated_at=document.updated_at,
document_date=document.document_date,
uploader_name=document.uploader.full_name or document.uploader.email,
uploader_name=document.uploader.full_name or document.uploader.email if document.uploader else "Unknown",
tags=[tag.name for tag in document.tags],
book_id=str(document.book.id) if document.book else None,
book_title=document.book.title if document.book else None,
book_author=document.book.author if document.book else None,
sort_order=document.sort_order,
matched_pdf_id=str(document.matched_pdf_id) if document.matched_pdf_id else None
matched_pdf_id=str(document.matched_pdf_id) if document.matched_pdf_id else None,
original_filename=document.original_filename
)