Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
validata-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Validata
validata-ui
Commits
6be3cbdc
Commit
6be3cbdc
authored
Jun 24, 2019
by
Christophe Benz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
4 changed files
with
16 additions
and
3 deletions
+16
-3
CHANGELOG.md
CHANGELOG.md
+6
-0
validata_ui/VERSION
validata_ui/VERSION
+1
-1
validata_ui/__init__.py
validata_ui/__init__.py
+8
-2
validata_ui/views.py
validata_ui/views.py
+1
-0
No files found.
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
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