A platform for community discussion. Free, open, simple.
FIX: Skip validation when saving in `Upload#migrate_to_new_scheme`.
Guo Xiang Tan0ac6a58b09cf
diff --git a/app/models/upload.rb b/app/models/upload.rbindex 4a53823df5a..8e1b312b9aa 100644--- a/app/models/upload.rb+++ b/app/models/upload.rb@@ -259,7 +259,7 @@ class Upload < ActiveRecord::BaseFile.open(path) do |f|upload.url = Discourse.store.store_upload(f, upload)upload.filesize = f.size- upload.save!+ upload.save!(validate: false)end# remap the URLsDbHelper.remap(UrlHelper.absolute(previous_url), upload.url) unless external