Prevent useless call to _update_content on _summary when requested

Links in summary have been processed in Content.__init__ already.
This commit is contained in:
Charles Flèche 2017-10-14 02:32:09 +07:00
commit 4603cf9627

View file

@ -151,8 +151,8 @@ class Content(object):
# store the summary metadata if it is set
if 'summary' in metadata:
self._summary = metadata['summary']
if 'summary' in self.metadata:
self._summary = self.metadata['summary']
signals.content_object_init.send(self)
@ -348,7 +348,7 @@ class Content(object):
content.
"""
if hasattr(self, '_summary'):
return self._update_content(self._summary, siteurl)
return self._summary
if self.settings['SUMMARY_MAX_LENGTH'] is None:
return self.content