Skip to content

Commit

Permalink
Return unicode representation for descriptions.
Browse files Browse the repository at this point in the history
Since those go into the catalog, we need to have a unicode here and  no
I18NDict which can't be serialized to JSON later.

A rebuild of the portal_catalog will fix any possible issues for
existing content.
  • Loading branch information
thomasmassmann committed Feb 8, 2018
1 parent 08db279 commit 01e179f
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/pkan/dcatapde/content/dcat_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def Title(self):
return unicode(self.dct_title)

def Description(self):
return self.dct_description
return unicode(self.dct_description)


class DCATCatalogDefaultFactory(DexterityFactory):
Expand Down
2 changes: 1 addition & 1 deletion src/pkan/dcatapde/content/dcat_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def Title(self):
return unicode(self.dct_title)

def Description(self):
return self.dct_description
return unicode(self.dct_description)


class DCATDatasetDefaultFactory(DexterityFactory):
Expand Down
2 changes: 1 addition & 1 deletion src/pkan/dcatapde/content/dcat_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def Title(self):
return unicode(self.dct_title)

def Description(self):
return self.dct_description
return unicode(self.dct_description)


class DCATDistributionDefaultFactory(DexterityFactory):
Expand Down
2 changes: 1 addition & 1 deletion src/pkan/dcatapde/content/dct_licensedocument.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def Title(self):
return unicode(self.dct_title)

def Description(self):
return self.dct_description
return unicode(self.dct_description)

def title_for_vocabulary(self):
"""Return a title suitable for vocabulary terms."""
Expand Down
2 changes: 1 addition & 1 deletion src/pkan/dcatapde/content/dct_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def Title(self):
return unicode(self.dct_title)

def Description(self):
return self.dct_description
return unicode(self.dct_description)

def title_for_vocabulary(self):
"""Return a title suitable for vocabulary terms."""
Expand Down
2 changes: 1 addition & 1 deletion src/pkan/dcatapde/content/dct_mediatypeorextent.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def Title(self):
return unicode(self.dct_title)

def Description(self):
return self.dct_description
return unicode(self.dct_description)


class DCTMediaTypeOrExtentDefaultFactory(DexterityFactory):
Expand Down
2 changes: 1 addition & 1 deletion src/pkan/dcatapde/content/foaf_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def Title(self):
return unicode(self.dct_title)

def Description(self):
return self.dct_description
return unicode(self.dct_description)


class FOAFAgentDefaultFactory(DexterityFactory):
Expand Down
2 changes: 1 addition & 1 deletion src/pkan/dcatapde/content/skos_concept.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def Title(self):
return unicode(self.dct_title)

def Description(self):
return self.dct_description
return unicode(self.dct_description)


class SKOSConceptDefaultFactory(DexterityFactory):
Expand Down
2 changes: 1 addition & 1 deletion src/pkan/dcatapde/content/skos_conceptscheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def Title(self):
return unicode(self.dct_title)

def Description(self):
return self.dct_description
return unicode(self.dct_description)


class SKOSConceptSchemeDefaultFactory(DexterityFactory):
Expand Down

0 comments on commit 01e179f

Please sign in to comment.