Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon
Commits
317ec06d
Unverified
Commit
317ec06d
authored
2 years ago
by
Eugen Rochko
Committed by
GitHub
2 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix error when uploading malformed CSV import (#19509)
parent
5fa34093
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/validators/import_validator.rb
+2
-0
app/validators/import_validator.rb
config/locales/activerecord.en.yml
+4
-0
config/locales/activerecord.en.yml
with
6 additions
and
0 deletions
+6
-0
app/validators/import_validator.rb
+
2
-
0
View file @
317ec06d
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
config/locales/activerecord.en.yml
+
4
-
0
View file @
317ec06d
...
...
@@ -29,6 +29,10 @@ en:
attributes
:
website
:
invalid
:
is not a valid URL
import
:
attributes
:
data
:
malformed
:
is malformed
status
:
attributes
:
reblog
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets