From 4603cf9627c4d391989f963d4c5878fdeb059c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles=20Fl=C3=A8che?= Date: Sat, 14 Oct 2017 02:32:09 +0700 Subject: [PATCH] Prevent useless call to _update_content on _summary when requested Links in summary have been processed in Content.__init__ already. --- pelican/contents.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pelican/contents.py b/pelican/contents.py index 2494edbb..88089e47 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -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