Commit 24eff471 authored by Denis Laxalde's avatar Denis Laxalde
Browse files

[entities] Handle cases where dataset maintainer is not a CWUser

parent c7556306b72d
......@@ -106,6 +106,9 @@ class CKANDatasetAdapter(EntityAdapter):
}
maintainer = self.dataset_maintainer()
if maintainer:
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment