[object Object]

← back to Norma

fix(pipeline/reorder): cast org_id param as ::uuid not ::text — pipeline drag-drop was 500-ing for staff role with non-null orgId due to same uuid=text operator mismatch already fixed in pipeline/stats + settings

4f1d74b4336135d59ff3a0614dbf600b5aa8ffb1 · 2026-05-20 09:51:55 -0700 · Steve Abrams

Files touched

Diff

commit 4f1d74b4336135d59ff3a0614dbf600b5aa8ffb1
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed May 20 09:51:55 2026 -0700

    fix(pipeline/reorder): cast org_id param as ::uuid not ::text — pipeline drag-drop was 500-ing for staff role with non-null orgId due to same uuid=text operator mismatch already fixed in pipeline/stats + settings
---
 app/api/pipeline/reorder/route.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/api/pipeline/reorder/route.ts b/app/api/pipeline/reorder/route.ts
index 9ee6683..69f5938 100644
--- a/app/api/pipeline/reorder/route.ts
+++ b/app/api/pipeline/reorder/route.ts
@@ -54,7 +54,7 @@ export async function PATCH(request: NextRequest) {
       await client.query(
         `UPDATE petition_pipeline
          SET status = $1, position = $2, updated_at = NOW()
-         WHERE id = $3 AND ($4::text IS NULL OR org_id = $4)`,
+         WHERE id = $3::uuid AND ($4::uuid IS NULL OR org_id = $4::uuid)`,
         [stage, position, id, orgId]
       );
     }

← 9619a2a petition create: debounce double-submit via useRef guard + 3  ·  back to Norma  ·  fix(editor): set immediatelyRender:false on Tiptap useEditor e46e6f9 →