Fix handler return types: return file path lists not dicts
job_server.py expects process() to return a list of file paths for
MinIO upload. The 499-Q and discontinuance handlers were returning
dicts like {'status':'admin_review'} which caused the job_server to
iterate dict keys as file paths -> 'File not found: status'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0bdaa4c373
commit
3e04edd384
2 changed files with 5 additions and 4 deletions
|
|
@ -200,7 +200,8 @@ class Form499ADiscontinuanceHandler(BaseServiceHandler):
|
|||
filer_id=filer_id,
|
||||
)
|
||||
|
||||
return {"status": "submitted_for_processing", "letter_generated": bool(letter_path)}
|
||||
# Return list of file paths for MinIO upload (letter already uploaded above)
|
||||
return [letter_path] if letter_path else []
|
||||
|
||||
def _send_confirmation(
|
||||
self, to: str, entity_name: str, order_number: str, filer_id: str,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class Form499QHandler(BaseServiceHandler):
|
|||
|
||||
if not intake_data.get("intake_completed"):
|
||||
logger.info("Form499QHandler: %s intake not completed — waiting", order_number)
|
||||
return None
|
||||
return []
|
||||
|
||||
quarter = intake_data.get("quarter", "?")
|
||||
revenue = intake_data.get("revenue", {})
|
||||
|
|
@ -92,7 +92,7 @@ class Form499QHandler(BaseServiceHandler):
|
|||
quarter=quarter,
|
||||
due_date=intake_data.get("due_date", ""),
|
||||
)
|
||||
return {"status": "admin_review"}
|
||||
return [] # no files to upload — admin will file manually
|
||||
|
||||
# ── USAC E-File submission via Playwright ──────────────────────
|
||||
work_dir = tempfile.mkdtemp(prefix=f"499q_{order_number}_")
|
||||
|
|
@ -154,7 +154,7 @@ class Form499QHandler(BaseServiceHandler):
|
|||
due_date=intake_data.get("due_date", ""),
|
||||
)
|
||||
|
||||
return {"status": "filed" if confirmation_number else "pending_manual", "confirmation": confirmation_number}
|
||||
return [] # confirmation PDF already uploaded to MinIO in _submit_to_usac
|
||||
|
||||
async def _submit_to_usac(
|
||||
self, order_number: str, entity: dict, intake_data: dict,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue