mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 01:55:46 +08:00
FIX: Upload#migrate_to_new_scheme
should not migrate system uploads.
This commit is contained in:
@ -224,7 +224,10 @@ class Upload < ActiveRecord::Base
|
||||
max_file_size_kb = [SiteSetting.max_image_size_kb, SiteSetting.max_attachment_size_kb].max.kilobytes
|
||||
local_store = FileStore::LocalStore.new
|
||||
|
||||
scope = Upload.where("url NOT LIKE '%/original/_X/%'").order(id: :desc)
|
||||
scope = Upload.by_users
|
||||
.where("url NOT LIKE '%/original/_X/%'")
|
||||
.order(id: :desc)
|
||||
|
||||
scope = scope.limit(limit) if limit
|
||||
|
||||
scope.each do |upload|
|
||||
|
Reference in New Issue
Block a user