mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-18 07:38:42 +00:00
Fix error when uploading malformed CSV import (#19509)
This commit is contained in:
parent
5fa340931e
commit
317ec06dc7
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue