From 245a37aeab9f0fd40a612b708e098e30d94f5349 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Sun, 11 Jan 2026 17:39:48 -0800 Subject: [PATCH] Fix IsActive bit field comparison in team API Cast BIT(1) to UNSIGNED INT in SQL and use val() for comparison to correctly handle MySQL bit fields in ColdFusion/Lucee. Co-Authored-By: Claude Opus 4.5 --- api/portal/team.cfm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/portal/team.cfm b/api/portal/team.cfm index 05f8124..147b27f 100644 --- a/api/portal/team.cfm +++ b/api/portal/team.cfm @@ -39,12 +39,13 @@ if (businessId <= 0) { try { // Get employees for this business with user details + // Cast BIT to INT to avoid binary comparison issues qTeam = queryExecute(" SELECT e.EmployeeID, e.UserID, e.EmployeeStatusID, - e.EmployeeIsActive, + CAST(e.EmployeeIsActive AS UNSIGNED) AS EmployeeIsActive, u.UserFirstName, u.UserLastName, u.UserEmailAddress, @@ -76,7 +77,7 @@ try { "Phone": row.UserContactNumber, "StatusID": row.EmployeeStatusID, "StatusName": row.StatusName, - "IsActive": row.EmployeeIsActive == 1 + "IsActive": val(row.EmployeeIsActive) == 1 }); }