Failed file upload shouldn't crash phpBB3 importer
This commit is contained in:
@@ -65,7 +65,7 @@ module ImportScripts::PhpBB3
|
||||
filename = File.basename(path)
|
||||
upload = @uploader.create_upload(Discourse::SYSTEM_USER_ID, path, filename)
|
||||
|
||||
if upload.nil? || !upload.valid?
|
||||
if upload.nil? || !upload.persisted?
|
||||
puts "Failed to upload #{path}"
|
||||
puts upload.errors.inspect if upload
|
||||
html = nil
|
||||
|
||||
Reference in New Issue
Block a user