fix(06.2): CR-05 remove UUID dash-stripping in quota SQL — PostgreSQL expects dashed UUID format

This commit is contained in:
curo1305
2026-06-01 14:26:24 +02:00
parent 3fa7e8b866
commit 653cb3a98b
+2 -2
View File
@@ -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