Fixes #708 SUMMARY_MAX_LENGTH=0 should return empty string

This commit is contained in:
Deniz Turgut 2013-04-26 19:37:31 -04:00
commit 9af62414db
2 changed files with 8 additions and 4 deletions

View file

@ -231,10 +231,11 @@ class Content(object):
if hasattr(self, '_summary'):
return self._summary
if self.settings['SUMMARY_MAX_LENGTH']:
return truncate_html_words(self.content,
self.settings['SUMMARY_MAX_LENGTH'])
return self.content
if self.settings['SUMMARY_MAX_LENGTH'] is None:
return self.content
return truncate_html_words(self.content,
self.settings['SUMMARY_MAX_LENGTH'])
def _set_summary(self, summary):
"""Dummy function"""