Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Validata
Validata UI
Commits
53d1a3ac
Commit
53d1a3ac
authored
May 20, 2021
by
Pierre Dittgen
Browse files
Handle source encoding error
parent
0420475b
Changes
1
Show whitespace changes
Inline
Side-by-side
validata_ui/views.py
View file @
53d1a3ac
...
...
@@ -19,6 +19,7 @@ from validata_core.helpers import (
FileContentValidataResource
,
URLValidataResource
,
ValidataResource
,
ValidataSourceError
,
is_body_error
,
is_structure_error
,
)
...
...
@@ -361,7 +362,13 @@ def validate(schema_instance: SchemaInstance, validata_resource: ValidataResourc
}
# Parse source data once
try
:
header
,
rows
=
validata_resource
.
extract_tabular_data
()
except
ValidataSourceError
as
err
:
flash_error
(
f
"Erreur de lecture du fichier source :
{
err
.
message
}
"
)
return
redirect
(
compute_validation_form_url
(
schema_instance
.
request_parameters
())
)
rows_count
=
len
(
rows
)
# Call validata_core with parsed data
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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