fix(exam): response_model=None on auto-map route (Union[dict,JSONResponse])
Some checks failed
api-ci-deploy / test-build-deploy (push) Has been cancelled
Some checks failed
api-ci-deploy / test-build-deploy (push) Has been cancelled
The auto-map endpoint returns dict (sync 200) or JSONResponse (202 async OCR); FastAPI cannot build a response model from that Union. Fixes import-time FastAPIError introduced with the S5-2 endpoint. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
2ac892c291
commit
a01a25cc2e
@ -686,7 +686,7 @@ async def get_template_source_pdf(
|
|||||||
return Response(content=pdf_bytes, media_type="application/pdf")
|
return Response(content=pdf_bytes, media_type="application/pdf")
|
||||||
|
|
||||||
|
|
||||||
@router.post("/templates/{template_id}/auto-map")
|
@router.post("/templates/{template_id}/auto-map", response_model=None)
|
||||||
async def auto_map_template(
|
async def auto_map_template(
|
||||||
template_id: str,
|
template_id: str,
|
||||||
background_tasks: BackgroundTasks,
|
background_tasks: BackgroundTasks,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user