DEV: Remove unused line of code.

DEV: Remove unused line of code.

diff --git a/app/jobs/regular/create_avatar_thumbnails.rb b/app/jobs/regular/create_avatar_thumbnails.rb
index 2d70460..01bb212 100644
--- a/app/jobs/regular/create_avatar_thumbnails.rb
+++ b/app/jobs/regular/create_avatar_thumbnails.rb
@@ -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(
diff --git a/lib/backup_restore/restorer.rb b/lib/backup_restore/restorer.rb
index f4f6612..d53d971 100644
--- a/lib/backup_restore/restorer.rb
+++ b/lib/backup_restore/restorer.rb
@@ -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
 
diff --git a/lib/upload_creator.rb b/lib/upload_creator.rb
index de20743..397016b 100644
--- a/lib/upload_creator.rb
+++ b/lib/upload_creator.rb
@@ -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?

GitHub sha: ebca588f