forked from github/pelican
Set default content status to a blank string rather than None.
Fixes #2558. Fixes issues encountered by comment plugins among others c.f. [1](https://github.com/bstpierre/pelican-comments/pull/4), [2](https://github.com/Scheirle/pelican_comment_system/issues/8), [3](https://github.com/Scheirle/pelican_comment_system/pull/7)
This commit is contained in:
parent
7c2a7478d7
commit
b2da535fec
2 changed files with 10 additions and 1 deletions
7
RELEASE.md
Normal file
7
RELEASE.md
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
Release type: patch
|
||||||
|
|
||||||
|
Set default content status to a blank string rather than `None`. Fixes
|
||||||
|
[#2558](https://github.com/getpelican/pelican/issues/2558). Fixes issues
|
||||||
|
encountered by comment plugins among others
|
||||||
|
([1](https://github.com/bstpierre/pelican-comments/pull/4),
|
||||||
|
[2](https://github.com/Scheirle/pelican_comment_system/issues/8)).
|
||||||
|
|
@ -141,7 +141,9 @@ class Content(object):
|
||||||
|
|
||||||
# manage status
|
# manage status
|
||||||
if not hasattr(self, 'status'):
|
if not hasattr(self, 'status'):
|
||||||
self.status = getattr(self, 'default_status', None)
|
# using None as the default here breaks comment plugins (and
|
||||||
|
# probably others)
|
||||||
|
self.status = getattr(self, 'default_status', '')
|
||||||
|
|
||||||
# store the summary metadata if it is set
|
# store the summary metadata if it is set
|
||||||
if 'summary' in metadata:
|
if 'summary' in metadata:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue