Fix overview counts query: cast enum to text for COALESCE

This commit is contained in:
Abhinav Raut
2026-03-28 21:30:22 +05:30
parent 8a1ac870d0
commit c59ce4eced
+1 -1
View File
@@ -6,7 +6,7 @@ SELECT
'awaiting_response',
COUNT(
CASE
WHEN COALESCE(c.meta->'last_message'->>'sender_type', c.last_message_sender) = 'contact' THEN 1
WHEN COALESCE(c.meta->'last_message'->>'sender_type', c.last_message_sender::text) = 'contact' THEN 1
END
),
'unassigned',