diff --git a/09 - Audits/Activity Log.md b/09 - Audits/Activity Log.md index 77cf256..f388c14 100644 --- a/09 - Audits/Activity Log.md +++ b/09 - Audits/Activity Log.md @@ -1073,4 +1073,22 @@ the new device shows (frontend surfaces backend message verbatim). --- +### 2026-06-03 — backend v2.8.71 — fix template-creation 500 (blank optional fields vs CHECK constraints) + +Seller "create request template" returned HTTP 500 whenever optional fields were +left empty. The request_templates table has CHECK constraints that allow only +NULL or a valid pattern — product_link (`~ '^https?://.+'`) and delivery_email +(email regex) — and the nullable service_session_type enum rejects ''. Both +DrizzleMarketplaceRepo.createRequestTemplate and updateRequestTemplate passed the +form's empty strings straight into the INSERT/UPDATE, tripping the constraints. +Added a `blank()` coercion: blank optional strings → NULL/undefined for +product_link, delivery_email, size/color/brand, service_location/notes, +proposal_title/description, service_session_type; enum columns (product_type, +delivery_type, urgency, budget_currency, metadata_source) fall back to their +defaults instead of receiving ''. +(Confirmed deployed backend is now on the 2.8.x line — logs show v2.8.70.) +**Verification:** backend tsc clean. + +--- +