From c85b9c6ed3a847ce0df7d58340d6680536d92b90 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 9 Jan 2019 18:51:58 -0500 Subject: [PATCH] FIX: searching email logs by reply key (#6868) * you can't use LIKE or ILIKE on a UUID --- app/controllers/admin/email_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/email_controller.rb b/app/controllers/admin/email_controller.rb index 04b015b3c06..476f0aff8da 100644 --- a/app/controllers/admin/email_controller.rb +++ b/app/controllers/admin/email_controller.rb @@ -32,7 +32,7 @@ class Admin::EmailController < Admin::AdminController if params[:reply_key].present? email_logs = email_logs.where( - "post_reply_keys.reply_key ILIKE ?", "%#{params[:reply_key]}%" + "CAST (post_reply_keys.reply_key AS VARCHAR) ILIKE ?", "%#{params[:reply_key]}%" ) end