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
6be3cbdc
Commit
6be3cbdc
authored
Jun 24, 2019
by
Christophe Benz
Browse files
Don't fail if error loading catalog
parent
ee01c9e7
Pipeline
#1094
passed with stage
in 4 minutes and 57 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
6be3cbdc
## 0.2.2
Non-breaking changes:
-
Don't fail if error loading catalog
## 0.2.1
Non-breaking changes:
...
...
validata_ui/VERSION
View file @
6be3cbdc
0.2.
1
0.2.
2
validata_ui/__init__.py
View file @
6be3cbdc
...
...
@@ -8,11 +8,12 @@ from urllib.parse import quote_plus
import
cachecontrol
import
flask
import
jinja2
import
opendataschema
import
pkg_resources
import
requests
import
tableschema
import
opendataschema
from
.
import
config
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -51,7 +52,12 @@ class SchemaCatalogRegistry:
def
build_schema_catalog
(
self
,
name
):
if
name
in
self
.
url_map
:
catalog_url
=
self
.
url_map
[
name
]
return
opendataschema
.
SchemaCatalog
(
catalog_url
,
session
=
self
.
session
)
try
:
catalog
=
opendataschema
.
SchemaCatalog
(
catalog_url
,
session
=
self
.
session
)
except
requests
.
exceptions
.
RequestException
as
exc
:
log
.
exception
(
exc
)
return
None
return
catalog
return
None
...
...
validata_ui/views.py
View file @
6be3cbdc
...
...
@@ -427,6 +427,7 @@ def homepage_config_with_schema_metadata(ui_config):
section_name
=
section
[
'name'
]
schema_catalog
=
get_schema_catalog
(
section_name
)
if
schema_catalog
is
None
:
section
[
'catalog'
]
=
[]
continue
schema_list
=
[]
for
ref
in
schema_catalog
.
references
:
...
...
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