Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MJU-POPS
ckanext-dgu
Commits
c8a7aae8
Commit
c8a7aae8
authored
Apr 04, 2016
by
David Read
Browse files
Cope with displaying harvested license IDs which we dont recognize. e.g. uk-ogl3 from calderdale
parent
c3fd6642
Changes
1
Hide whitespace changes
Inline
Side-by-side
ckanext/dgu/lib/helpers.py
View file @
c8a7aae8
...
...
@@ -1019,9 +1019,15 @@ def get_licenses(pkg):
if
pkg
.
license_id
and
not
licence
:
# just license_id
licenses
.
append
((
pkg
.
license
.
title
.
split
(
'::'
)[
-
1
],
pkg
.
license
.
url
,
pkg
.
license
.
isopen
(),
pkg
.
license
.
id
==
'uk-ogl'
))
if
pkg
.
license
:
licenses
.
append
((
pkg
.
license
.
title
.
split
(
'::'
)[
-
1
],
pkg
.
license
.
url
,
pkg
.
license
.
isopen
(),
pkg
.
license
.
id
==
'uk-ogl'
))
else
:
# i.e. license_id is unknown - probably harvested from another ckan
licenses
.
append
((
pkg
.
license_id
,
None
,
None
,
None
))
elif
not
licence
:
# no licence at all
pass
...
...
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