FIX: Missing attribute.

This commit is contained in:
Guo Xiang Tan 2017-10-02 10:24:37 +08:00
parent 8f7062bd7b
commit 77ea063751
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ 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(args[:user_id] || upload.user_id)
return unless user = User.find_by(id: args[:user_id] || upload.user_id)
Discourse.avatar_sizes.each do |size|
OptimizedImage.create_for(upload, size, size, filename: upload.original_filename, allow_animation: SiteSetting.allow_animated_avatars)