diff --git a/HISTORY.rst b/HISTORY.rst index 24559b8..cab8140 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,6 +9,7 @@ History ******************* * Drop python 2.6 compatibility +* Fixed exceptions in __str__ ******************* 0.8.12 (2017-03-11) diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index 44b3545..7f09194 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -98,7 +98,7 @@ class BlogCategory(TranslatableModel): ) def __str__(self): - return self.safe_translation_getter('name') + return self.safe_translation_getter('name', any_language=True) def save(self, *args, **kwargs): super(BlogCategory, self).save(*args, **kwargs) @@ -203,7 +203,7 @@ class Post(KnockerModel, ModelMeta, TranslatableModel): get_latest_by = 'date_published' def __str__(self): - return self.safe_translation_getter('title') + return self.safe_translation_getter('title', any_language=True) @property def guid(self, language=None):