From c1edb20e53bdeeed31ffcd3701b94dc18939704b Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Fri, 6 Feb 2026 18:24:52 -0800 Subject: [PATCH] Fix customer lookup - treat UserID 0 as NULL --- api/tasks/getDetails.cfm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tasks/getDetails.cfm b/api/tasks/getDetails.cfm index b5ff453..e57beba 100644 --- a/api/tasks/getDetails.cfm +++ b/api/tasks/getDetails.cfm @@ -74,7 +74,7 @@ LEFT JOIN Businesses b ON b.ID = t.BusinessID LEFT JOIN ServicePoints sp ON sp.ID = o.ServicePointID LEFT JOIN ServicePoints tsp ON tsp.ID = t.ServicePointID - LEFT JOIN Users u ON u.ID = COALESCE(t.UserID, o.UserID) + LEFT JOIN Users u ON u.ID = COALESCE(NULLIF(t.UserID, 0), o.UserID) WHERE t.ID = ? ", [ { value = TaskID, cfsqltype = "cf_sql_integer" } ], { datasource = "payfrit" })>