fix(06.2): CR-05 remove UUID dash-stripping in quota SQL — PostgreSQL expects dashed UUID format
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user