From add6e12ce4d10dd488d8fab1c64124488a5cd73b Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 18 Aug 2015 17:34:46 +1000 Subject: [PATCH] FIX: topic links with long titles can not be crawled 0..255 == 256 numbers column fits 255 --- app/jobs/regular/crawl_topic_link.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/regular/crawl_topic_link.rb b/app/jobs/regular/crawl_topic_link.rb index 7ad789cfedc..e77fedfab63 100644 --- a/app/jobs/regular/crawl_topic_link.rb +++ b/app/jobs/regular/crawl_topic_link.rb @@ -119,7 +119,7 @@ module Jobs title.gsub!(/ +/, ' ') title.strip! if title.present? - crawled = (TopicLink.where(id: topic_link.id).update_all(['title = ?, crawled_at = CURRENT_TIMESTAMP', title[0..255]]) == 1) + crawled = (TopicLink.where(id: topic_link.id).update_all(['title = ?, crawled_at = CURRENT_TIMESTAMP', title[0..254]]) == 1) end end end