Don't raise an error if user has been destroyed.
This commit is contained in:
parent
d5d66e969e
commit
4eeb6014f4
|
@ -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(args[:user_id] || upload.user_id)
|
||||
return unless user = User.find_by(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)
|
||||
|
|
Loading…
Reference in New Issue