Merge pull request #3530 from evazion/fix-3528

Fix #3527: Bookmarklet timeouts for Members.
This commit is contained in:
Albert Yi
2018-02-01 16:03:17 -08:00
committed by GitHub

View File

@@ -75,9 +75,9 @@ class UploadsController < ApplicationController
protected
def find_post_by_url(normalized_url)
if normalized_url.nil?
Post.where(source: params[:url]).first
Post.where("SourcePattern(lower(posts.source)) = ?", params[:url]).first
else
Post.where(source: [params[:url], @normalized_url]).first
Post.where("SourcePattern(lower(posts.source)) IN (?)", [params[:url], @normalized_url]).first
end
end