This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Fix error when uploading malformed CSV import (
#19509
)
closed-social-glitch-2
Eugen Rochko
2 years ago
committed by
GitHub
parent
5fa340931e
commit
317ec06dc7
No known key found for this signature in database
GPG Key ID:
4AEE18F83AFDEB23
2 changed files
with
6 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
app/validators/import_validator.rb
+4
-0
config/locales/activerecord.en.yml
+ 2
- 0
app/validators/import_validator.rb
View File
@ -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
+ 4
- 0
config/locales/activerecord.en.yml
View File
@ -29,6 +29,10 @@ en:
attributes:
website:
invalid
:
is not a valid URL
import:
attributes:
data:
malformed
:
is malformed
status:
attributes:
reblog:
Write
Preview
Loading…
Cancel
Save