Fixed exceptions in __str__
This commit is contained in:
parent
10c8f0f2dd
commit
1809354573
2 changed files with 3 additions and 2 deletions
|
@ -9,6 +9,7 @@ History
|
|||
*******************
|
||||
|
||||
* Drop python 2.6 compatibility
|
||||
* Fixed exceptions in __str__
|
||||
|
||||
*******************
|
||||
0.8.12 (2017-03-11)
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue