From 5076487eaf6b65c43c6b8c6f5a5f0540950f4a9f Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 9 Nov 2018 14:14:31 +0800 Subject: [PATCH] Update `discuz_x` import script to not use `Category#logo_url`. --- script/import_scripts/discuz_x.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/import_scripts/discuz_x.rb b/script/import_scripts/discuz_x.rb index 54c50719171..83d2cae916e 100644 --- a/script/import_scripts/discuz_x.rb +++ b/script/import_scripts/discuz_x.rb @@ -287,7 +287,7 @@ class ImportScripts::DiscuzX < ImportScripts::Base if !row['icon'].empty? upload = create_upload(Discourse::SYSTEM_USER_ID, File.join(DISCUZX_BASE_DIR, ATTACHMENT_DIR, '../common', row['icon']), File.basename(row['icon'])) if upload - category.logo_url = upload.url + category.uploaded_logo = upload # FIXME: I don't know how to get '/shared' by script. May change to Rails.root category.color = Miro::DominantColors.new(File.join('/shared', category.logo_url)).to_hex.first[1, 6] if !color category.save!