DEV: Remove unused line of code.

This commit is contained in:
Guo Xiang Tan 2019-05-02 16:08:12 +08:00
parent 75591664e7
commit ebca588fd0
3 changed files with 2 additions and 3 deletions

View File

@ -10,7 +10,6 @@ module Jobs
raise Discourse::InvalidParameters.new(:upload_id) if upload_id.blank?
return unless upload = Upload.find_by(id: upload_id)
return unless user = User.find_by(id: args[:user_id] || upload.user_id)
Discourse.avatar_sizes.each do |size|
OptimizedImage.create_for(

View File

@ -463,7 +463,7 @@ module BackupRestore
SQL
User.where("uploaded_avatar_id IS NOT NULL").find_each do |user|
Jobs.enqueue(:create_avatar_thumbnails, upload_id: user.uploaded_avatar_id, user_id: user.id)
Jobs.enqueue(:create_avatar_thumbnails, upload_id: user.uploaded_avatar_id)
end
end

View File

@ -130,7 +130,7 @@ class UploadCreator
end
if @upload.errors.empty? && is_image && @opts[:type] == "avatar" && @upload.extension != "svg"
Jobs.enqueue(:create_avatar_thumbnails, upload_id: @upload.id, user_id: user_id)
Jobs.enqueue(:create_avatar_thumbnails, upload_id: @upload.id)
end
if @upload.errors.empty?