diff --git a/backend/api/documents.py b/backend/api/documents.py index 40cb68e..97ed572 100644 --- a/backend/api/documents.py +++ b/backend/api/documents.py @@ -345,7 +345,7 @@ async def confirm_upload( " AND (used_bytes + :delta) <= limit_bytes " "RETURNING used_bytes, limit_bytes" ), - {"delta": size, "uid": str(doc.user_id).replace("-", "")}, + {"delta": size, "uid": str(doc.user_id)}, ) row = result.fetchone() @@ -353,7 +353,7 @@ async def confirm_upload( # Quota exceeded — fetch current quota state for the 413 body quota_result = await session.execute( text("SELECT used_bytes, limit_bytes FROM quotas WHERE user_id = :uid"), - {"uid": str(doc.user_id).replace("-", "")}, + {"uid": str(doc.user_id)}, ) q = quota_result.fetchone() # Delete the pending Document row and best-effort remove the MinIO object