You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(api): GET /documents crashes with 500 when created_at column is NULL in legacy DB rows #294
_to_document_schema in backend/app/api/documents.py at line ~136 passes record.created_at (which is str | None in DocumentRecord) to Document(created_at=...) where created_at: str is non-optional in the Pydantic schema. When the DB row has created_at=NULL (e.g. legacy rows from migration 001 before onupdate was added), Pydantic raises ValidationError and the GET /documents endpoint returns unhandled HTTP 500.
Fix
backend/app/api/documents.py: either make Document.created_at optional (str | None = None) or coerce None to an empty string / ISO timestamp default in _to_document_schema.
Impact
Any tenant that has documents created before the created_at column was added (migration 001 rows without onupdate DEFAULT) gets HTTP 500 on GET /documents.
Activity
fix(sprint-r4): root-cause fixes for all 17 bugs from code review rou…
piyushmakhija28 commentedon Jun 21, 2026
Fixed in PR #280 (Sprint R3/R4: fix(sprint-r3): root-cause fixes for all 39 bugs from code review round 3 + Sprint R4 round 4)