fix: numpy array or-Verknuepfung in Crop/Deskew + ImageCompareView Labels
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 37s
CI / test-go-edu-search (push) Successful in 30s
CI / test-python-klausur (push) Failing after 2m17s
CI / test-python-agent-core (push) Successful in 17s
CI / test-nodejs-website (push) Successful in 24s
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 37s
CI / test-go-edu-search (push) Successful in 30s
CI / test-python-klausur (push) Failing after 2m17s
CI / test-python-agent-core (push) Successful in 17s
CI / test-nodejs-website (push) Successful in 24s
- orientation_crop_api.py: `array or array` durch `is not None` ersetzt (ValueError bei numpy Arrays) - ocr_pipeline_api.py: gleicher Fix fuer Deskew-Fallback-Kette - ImageCompareView.tsx: Fallback-Text nutzt rightLabel statt "Begradigung" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -174,7 +174,8 @@ async def auto_crop(session_id: str):
|
||||
cached = await _ensure_cached(session_id)
|
||||
|
||||
# Use oriented image if available, else original
|
||||
img_bgr = cached.get("oriented_bgr") or cached.get("original_bgr")
|
||||
oriented = cached.get("oriented_bgr")
|
||||
img_bgr = oriented if oriented is not None else cached.get("original_bgr")
|
||||
if img_bgr is None:
|
||||
raise HTTPException(status_code=400, detail="No image available for cropping")
|
||||
|
||||
@@ -236,7 +237,8 @@ async def manual_crop(session_id: str, req: ManualCropRequest):
|
||||
"""Manually crop using percentage coordinates."""
|
||||
cached = await _ensure_cached(session_id)
|
||||
|
||||
img_bgr = cached.get("oriented_bgr") or cached.get("original_bgr")
|
||||
oriented = cached.get("oriented_bgr")
|
||||
img_bgr = oriented if oriented is not None else cached.get("original_bgr")
|
||||
if img_bgr is None:
|
||||
raise HTTPException(status_code=400, detail="No image available for cropping")
|
||||
|
||||
@@ -294,7 +296,8 @@ async def skip_crop(session_id: str):
|
||||
"""Skip cropping — use oriented (or original) image as-is."""
|
||||
cached = await _ensure_cached(session_id)
|
||||
|
||||
img_bgr = cached.get("oriented_bgr") or cached.get("original_bgr")
|
||||
oriented = cached.get("oriented_bgr")
|
||||
img_bgr = oriented if oriented is not None else cached.get("original_bgr")
|
||||
if img_bgr is None:
|
||||
raise HTTPException(status_code=400, detail="No image available")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user