mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:12:45 +08:00
DEV: Remove unused line of code.
This commit is contained in:
parent
75591664e7
commit
ebca588fd0
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue
Block a user