FIX: Skip validation when saving in `Upload#migrate_to_new_scheme`.
This commit is contained in:
parent
6ea14b591f
commit
0ac6a58b09
|
@ -259,7 +259,7 @@ class Upload < ActiveRecord::Base
|
||||||
File.open(path) do |f|
|
File.open(path) do |f|
|
||||||
upload.url = Discourse.store.store_upload(f, upload)
|
upload.url = Discourse.store.store_upload(f, upload)
|
||||||
upload.filesize = f.size
|
upload.filesize = f.size
|
||||||
upload.save!
|
upload.save!(validate: false)
|
||||||
end
|
end
|
||||||
# remap the URLs
|
# remap the URLs
|
||||||
DbHelper.remap(UrlHelper.absolute(previous_url), upload.url) unless external
|
DbHelper.remap(UrlHelper.absolute(previous_url), upload.url) unless external
|
||||||
|
|
Loading…
Reference in New Issue