Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
ckanpublish
Commits
70deedd11ff0
Commit
24eff471
authored
Dec 17, 2014
by
Denis Laxalde
Browse files
[entities] Handle cases where dataset maintainer is not a CWUser
parent
c7556306b72d
Changes
1
Hide whitespace changes
Inline
Side-by-side
entities.py
View file @
70deedd1
...
...
@@ -106,9 +106,12 @@ class CKANDatasetAdapter(EntityAdapter):
}
maintainer
=
self
.
dataset_maintainer
()
if
maintainer
:
data
[
'maintainer'
]
=
maintainer
.
dc_long_title
()
if
maintainer
.
primary_email
:
data
[
'maintainer_email'
]
=
maintainer
.
primary_email
[
0
].
address
if
isinstance
(
maintainer
,
basestring
):
data
[
'maintainer'
]
=
maintainer
else
:
data
[
'maintainer'
]
=
maintainer
.
dc_long_title
()
if
maintainer
.
primary_email
:
data
[
'maintainer_email'
]
=
maintainer
.
primary_email
[
0
].
address
data
[
'tags'
]
=
list
(
self
.
dataset_tags
())
data
[
'extras'
]
=
list
(
self
.
dataset_extras
())
return
data
...
...
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