From c0a2d9e67178e6684e3d92162b683f85c7d6b298 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Fri, 4 Aug 2017 12:30:35 +0530 Subject: [PATCH] Make rubocop happy --- lib/tasks/import.rake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tasks/import.rake b/lib/tasks/import.rake index df0aa7e0086..8a98dcac299 100644 --- a/lib/tasks/import.rake +++ b/lib/tasks/import.rake @@ -452,10 +452,10 @@ task "import:create_vbulletin_permalinks" => :environment do SiteSetting.permalink_normalizations = '/showthread.php\?t=(\d+).*/showthread.php?t=\1' Topic.listable_topics.find_each do |topic| - tcf = topic.custom_fields - if tcf && tcf["import_id"] - Permalink.create(url: "showthread.php?t=#{tcf["import_id"]}", topic_id: topic.id) rescue nil - end + tcf = topic.custom_fields + if tcf && tcf["import_id"] + Permalink.create(url: "showthread.php?t=#{tcf["import_id"]}", topic_id: topic.id) rescue nil + end end Category.find_each do |cat|