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
Alexandre Bulté
validata-ui
Commits
47535f5f
Commit
47535f5f
authored
Dec 13, 2018
by
Pierre Dittgen
Browse files
Affiche un message d'erreur en cas de ressource en ligne non accessible
parent
026d0717
Changes
1
Hide whitespace changes
Inline
Side-by-side
validata_ui/views.py
View file @
47535f5f
...
...
@@ -357,7 +357,12 @@ def scdl_validator(val_code):
if
url_param
is
None
or
url_param
==
''
:
flash_error
(
"Vous n'avez pas indiqué d'url à valider"
)
return
redirect
(
url_for
(
'scdl_validator'
,
val_code
=
val_code
))
return
validate
(
val_code
,
ValidataSource
(
'url'
,
url_param
,
url_param
))
try
:
return
validate
(
val_code
,
ValidataSource
(
'url'
,
url_param
,
url_param
))
except
tabulator
.
exceptions
.
HTTPError
as
e
:
flash_error
(
'Erreur : impossible d
\'
accéder au fichier source en ligne'
)
log
.
info
(
e
)
return
redirect
(
url_for
(
'scdl_validator'
,
val_code
=
val_code
))
else
:
# POST
input_param
=
request
.
form
.
get
(
'input'
)
...
...
Write
Preview
Supports
Markdown
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