FIX: Partial reply key search in email sent logs.

Follow up to c85b9c6ed3a847ce0df7d58340d6680536d92b90
This commit is contained in:
Guo Xiang Tan
2019-01-10 09:21:28 +08:00
parent 35b59cfa78
commit e9b2018bc8
7 changed files with 32 additions and 16 deletions

View File

@ -32,7 +32,7 @@ class Admin::EmailController < Admin::AdminController
if params[:reply_key].present?
email_logs = email_logs.where(
"CAST (post_reply_keys.reply_key AS VARCHAR) ILIKE ?", "%#{params[:reply_key]}%"
"post_reply_keys.reply_key::TEXT ILIKE ?", "%#{params[:reply_key]}%"
)
end