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
a9dbd73e
Commit
a9dbd73e
authored
Jun 14, 2019
by
Pierre Dittgen
Browse files
Validation error redirect to validation form
parent
30b8a478
Changes
1
Show whitespace changes
Inline
Side-by-side
validata_ui/views.py
View file @
a9dbd73e
...
...
@@ -328,13 +328,17 @@ def validate(schema_instance: SchemaInstance, source: ValidataResource):
# 400
if
req
.
status_code
==
400
:
json_response
=
req
.
json
()
if
json_response
.
get
(
'message'
)
==
'Missing headers'
:
flash_error
(
"Impossible d'extraire les en-têtes du fichier tabulaire"
)
return
redirect
(
compute_validation_form_url
(
schema_instance
))
flash_error
(
"Une erreur est survenue durant la validation: {}"
.
format
(
json_response
.
get
(
'message'
)))
return
redirect
(
url_for
(
"home"
))
return
redirect
(
compute_validation_form_url
(
schema_instance
))
if
not
req
.
ok
:
flash_error
(
"Un erreur s'est produite côté serveur :-("
)
return
redirect
(
url_for
(
"home"
))
return
redirect
(
compute_validation_form_url
(
schema_instance
))
json_response
=
req
.
json
()
validata_core_report
=
json_response
[
'report'
]
...
...
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