mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Add rubocop to our build. (#5004)
This commit is contained in:
@ -59,7 +59,6 @@ class ImportScripts::Muut < ImportScripts::Base
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def import_categories
|
||||
puts "", "Importing categories"
|
||||
|
||||
@ -72,7 +71,6 @@ class ImportScripts::Muut < ImportScripts::Base
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def import_discussions
|
||||
puts "", "Importing discussions"
|
||||
|
||||
@ -81,7 +79,6 @@ class ImportScripts::Muut < ImportScripts::Base
|
||||
|
||||
@imported_json['categories'].each do |category|
|
||||
|
||||
|
||||
@imported_json['threads'][category['path']].each do |thread|
|
||||
|
||||
next if thread["seed"]["key"] == "skip-this-topic"
|
||||
@ -96,7 +93,7 @@ class ImportScripts::Muut < ImportScripts::Base
|
||||
end
|
||||
|
||||
# update user display name
|
||||
if thread["seed"]["author"] && thread["seed"]["author"]["displayname"] != "" && mapped[:user_id] != -1
|
||||
if thread["seed"]["author"] && thread["seed"]["author"]["displayname"] != "" && mapped[:user_id] != -1
|
||||
user = User.find_by(id: mapped[:user_id])
|
||||
if user
|
||||
user.name = thread["seed"]["author"]["displayname"]
|
||||
@ -181,6 +178,6 @@ class ImportScripts::Muut < ImportScripts::Base
|
||||
|
||||
end
|
||||
|
||||
if __FILE__==$0
|
||||
if __FILE__ == $0
|
||||
ImportScripts::Muut.new.perform
|
||||
end
|
||||
|
Reference in New Issue
Block a user