github-actions[bot] commited on
Commit
e1c26fb
·
1 Parent(s): b721542

Automated deployment from GitHub Actions: 2cff9ffb7c6f0e77a5eca51468275568079a292e

Browse files
Files changed (1) hide show
  1. src/routers/batches.py +2 -1
src/routers/batches.py CHANGED
@@ -61,7 +61,8 @@ async def create_batch(
61
  doc_types: list[str] | None = Form(None),
62
  ) -> dict[str, Any]: # noqa: B008
63
  """Upload documents and create a new processing batch."""
64
- if not user.company_id:
 
65
  raise HTTPException(status_code=400, detail="User is not associated with a company.")
66
  if len(files) > 3:
67
  raise HTTPException(status_code=400, detail="Maximum 3 files per batch (B/L, Invoice, Packing List).")
 
61
  doc_types: list[str] | None = Form(None),
62
  ) -> dict[str, Any]: # noqa: B008
63
  """Upload documents and create a new processing batch."""
64
+ from ..config import settings
65
+ if not user.company_id and not settings.DISABLE_AUTH:
66
  raise HTTPException(status_code=400, detail="User is not associated with a company.")
67
  if len(files) > 3:
68
  raise HTTPException(status_code=400, detail="Maximum 3 files per batch (B/L, Invoice, Packing List).")