Unverified Commit 317ec06d authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix error when uploading malformed CSV import (#19509)

parent 5fa34093
Showing with 6 additions and 0 deletions
+6 -0
......@@ -26,6 +26,8 @@ class ImportValidator < ActiveModel::Validator
when 'following'
validate_following_import(import, row_count)
end
rescue CSV::MalformedCSVError
import.errors.add(:data, :malformed)
end
private
......
......@@ -29,6 +29,10 @@ en:
attributes:
website:
invalid: is not a valid URL
import:
attributes:
data:
malformed: is malformed
status:
attributes:
reblog:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment