'uploads:gather' should only work on local uploads
This commit is contained in:
parent
7783ba46fc
commit
71fe66c8c2
|
@ -12,7 +12,9 @@ task "uploads:gather" => :environment do
|
|||
|
||||
puts "", "Gathering uploads for '#{current_db}'...", ""
|
||||
|
||||
Upload.where("url !~ '^\/uploads\/#{current_db}'").find_each do |upload|
|
||||
Upload.where("url ~ '^\/uploads\/'")
|
||||
.where("url !~ '^\/uploads\/#{current_db}'")
|
||||
.find_each do |upload|
|
||||
begin
|
||||
old_db = upload.url[/^\/uploads\/([^\/]+)\//, 1]
|
||||
from = upload.url.dup
|
||||
|
|
Loading…
Reference in New Issue