FIX: searching email logs by reply key (#6868)

* you can't use LIKE or ILIKE on a UUID
This commit is contained in:
Michael Brown 2019-01-09 18:51:58 -05:00 committed by Guo Xiang Tan
parent 6f867660bc
commit c85b9c6ed3
1 changed files with 1 additions and 1 deletions

View File

@ -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