mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fixes after review
This commit is contained in:
parent
55d7cf438b
commit
9dcf612f9d
2 changed files with 5 additions and 3 deletions
|
|
@ -183,7 +183,10 @@ class URLWrapper(object):
|
|||
|
||||
def _from_settings(self, key):
|
||||
setting = "%s_%s" % (self.__class__.__name__.upper(), key)
|
||||
value = self.settings[setting] or ''
|
||||
value = self.settings[setting]
|
||||
value = value is not False and value or '' # change to '' only False
|
||||
if value == '':
|
||||
logger.warning(u'%s is disabled' % setting)
|
||||
return unicode(value).format(**self.as_dict())
|
||||
|
||||
url = property(functools.partial(_from_settings, key='URL'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue