Skip to content

Fix rejection logic for OCR jobs - #75

Merged
Mahakisore7 merged 1 commit into
mainfrom
fix/ocr-reject-guard
Oct 4, 2026
Merged

Mahakisore7 merged 1 commit into
mainfrom
fix/ocr-reject-guard

Conversation

@Mahakisore7

Copy link
Copy Markdown
Member

Ensure that only reviewable OCR jobs can be rejected. This change prevents approved jobs from being incorrectly labeled as rejected and avoids overwriting the status of pending or processing jobs. The rejection logic now aligns with the approval logic, returning appropriate conflict responses for non-reviewable jobs. Tests have been updated to reflect these changes.

Reject had no state check. Rejecting an approved job left its menu rows
live under a "rejected" label, and rejecting a pending or processing job
was silently overwritten when the worker finished. Reject now accepts the
same states as approve (ready_for_review, failed) and returns 409
otherwise; the admin page already shows the server's message.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Mahakisore7
Mahakisore7 merged commit 988c489 into main Oct 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant